-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
benchmark: always throw the same Error instance #34523
Conversation
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: nodejs#34512 (comment)
Hmm, I'm torn on this. While I get the reason for the change, it makes the benchmark even more unrealistic compared to real world user code. Our microbenchmarks are already overly optimized as it is. Not a blocking concern, however. |
@jasnell I mean, that really depends on what we’re measuring here, right? The point is to measure the performance effect of (For example, the other |
Yeah like I said, I'm torn on it and don't consider it blocking. I just think we way over index on microbenchmarks in general. |
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: #34512 (comment) PR-URL: #34523 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Andrey Pechkurov <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
Landed in b14ce72 |
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: #34512 (comment) PR-URL: #34523 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Andrey Pechkurov <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
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: #34512 (comment) PR-URL: #34523 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Andrey Pechkurov <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
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: #34512 (comment) PR-URL: #34523 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Andrey Pechkurov <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
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: #34512 (comment)
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes