Hacker News new | ask | show | jobs
by ndnichols 4716 days ago
These kinds of optimization/"hacks" articles need to include benchmarks. How does using one StringBuilder compare to using the implicit three or five? How many strings does one need to append before you should've used a StringBuilder? Etc.

I imagine that there's going to be novice programmers whose takeaway from the article is "Hashmaps with ints as keys are slow" or "String concatenation in Java is slow".