A little D3 war story: I wrote a solver for the Schrödinger equation, which would render a wavefunction with D3 and SVG - cool right.
It was very slow to render. Eventually I found out why: D3 was round-tripping the SVG through text! The render time was dominated by the browser parsing the thousands of 15+ digit floating point numbers.
I added a call to round the floats to two decimal places, so they would be textually shorter, and it was a huge speedup. What a strange optimization.
I later rewrote it using WebGL; here it is should you care: https://ridiculousfish.com/wavefiz/