Uh oh!
There was an error while loading. Please reload this page.
buffer: improve equals() performance - #29199
Conversation
nodejs-github-bot
commented
Aug 19, 2019
cf617f4 to
8ffa33fComparenodejs-github-bot
commented
Aug 19, 2019
There was a problem hiding this comment.
It should be sufficient to just keep e.g., 0, 512 and 16386. The other options are just intermediate steps.
There was a problem hiding this comment.
FWIW I copied this from buffer-compare.js, does that mean that should be changed as well?
Trott
commented
Aug 21, 2019
Need to add |
Trott
commented
Aug 21, 2019
Confirmed. This is needed. I tried to add a fixup commit but I don't have permission to the branch. |
Trott
left a comment
There was a problem hiding this comment.
LGTM but needs a change to avoid breaking test-benchmark-buffer
mscdex
commented
Aug 21, 2019
Shouldn't the test fail if it was breaking? |
8ffa33f to
f3f3b97Comparenodejs-github-bot
commented
Aug 21, 2019
nodejs-github-bot
commented
Aug 21, 2019
benchmark tests only run nightly in CI and only if you run |
There was a problem hiding this comment.
Super minor optional nit: The rest of the options are alphabetized. Can this go after line 14 intstead?
Trott
left a comment
There was a problem hiding this comment.
LGTM with or without my additional optional nit
f3f3b97 to
c7fe371Comparec7fe371 to
36f9f73Comparenodejs-github-bot
commented
Aug 22, 2019
nodejs-github-bot
commented
Aug 22, 2019
Trott
commented
Aug 22, 2019
Landed in f0c8898 |
PR-URL: nodejs#29199 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #29199 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Results:
I'm not sure offhand what's up with the large variance for
size=16386, especially since trying the samenvalue as the other cases actually resulted in an even larger variance. Anyway, the actual numbers don't really matter so much as the trend.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes