Hacker News new | ask | show | jobs
by rk06 834 days ago
I want to see the benchmarks that showed try catch as more efficient. It will certainly be Legendary or WTF category
1 comments

You never see benchmarks after such statements.
I have heard bizarre statements backed up by benchmarks. Eg lodash uses recursion for faster string concatenation for _.repeat() and then proved it was faster.

That said, performance hacks are often temporary: people get one benchmark, update their codebases for 'performance reasons', then the compiler updates and the code is filled with workarounds for an issue that doesn't exist anymore. There's lots of bad JS/TS using other styles because because ES2017 async/await was slow five years ago.