Skip to content

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

Comments

Note that this is an old revision of the test.

"Old revision" doesn't really mean anything on jsPerf since anybody can create a new revision which will increment the counter. The main point of having them numbered is so that you have something stable to link to.

The latest revision (35, as of this comment) is basically equivalent from most JS engines' perspective, and shows pretty much identical results.

AboutSource Built by g1lg1l

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