Skip to content

Comment on JS performance: try / catch versus checking for undefined

Comments

Coming from the Python ecosystem, I am utterly horrified by those results. In fact, I thought the graphs were broken until I got to IE10.

Yes, but remember that Python exceptions are cheap not because they are cheap, but because you are paying for them on every statement anyhow, so you might as well use them.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.