> the developer who had implemented the function said he had heard that if/then was inefficient, so he used try/catch instead
I would love to see that function
I would love to see that function
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.