4 ms·
Also related: https://accidentallyquadratic.tumblr.com/ https://accidentallyquadratic.tumblr.com/ examples of where, due to abstraction or otherwise, a quadrati
by userbinator 9y ago
Also related: https://accidentallyquadratic.tumblr.com/ https://accidentallyquadratic.tumblr.com/ examples of where, due to abstraction or otherwise, a quadratic or even worse algorithm emerges, and is not obvious from a quick glance since the multiple nested loops are separated out from each other.
- InclinedPlane 9y agoI ran into an excellent example of this once. A build system was performing a bunch of operations on a very large (hundreds of megs) xml file. There was a little javascript utility that was created to perform operations on the xml file. That script was called externally with hundreds of separate operations. This took about half of a day. Because each time the xml document was loaded and saved by the script took about 4 mins of overhead. I rewrote the script so that it could do multiple operations in one pass, bringing the time for that step back to about 4 mins total instead of 12 hours.