Unverified Commit c4457d87 authored by Anna Henningsen's avatar Anna Henningsen Committed by Shelley Vohr
Browse files

benchmark: always throw the same Error instance

Stack trace capturing currently accounts for 40 % of the benchmark
running time. Always throwing the same exception object removes
that overhead and lets the benchmark be more focused on what it is
supposed to measure.

Refs: https://github.com/nodejs/node/pull/34512#issuecomment-663977271

PR-URL: https://github.com/nodejs/node/pull/34523


Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarAndrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarGerhard Stöbich <deb2001-github@yahoo.de>
parent 44e6c010
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment