Skip to content

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

Comments

The latest revision is a completely different test. As klodolph explains in another comment, the presumably common case of no exception is generally how try/catch is optimized. So it stands to reason that the exception case would be slower and that there is potential for the non-exceptional case to be faster.

AboutSource Built by g1lg1l

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