TLDR Web Dev · ARTICLES & TUTORIALS

THE THREE BYTE FIX

breckyunits.com4 min read

Summary from the TLDR Web Dev newsletter

Our World in Data, a charity org that shows charts about the world, received a complaint about slow map charts. After some profiling, a developer found that the k-means clustering algorithm the site was using was the reason. The issue was due to a 3-character typo in the JavaScript port of the algorithm. Fixing the typo resulted in a 20x speed improvement.