| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Why did you change private properties to symbol properties? |
Sorry, something went wrong.
I presume because of the performance difference that still exists there (symbol are still faster). In this case, I would leave them as private fields. |
Sorry, something went wrong.
There was a problem hiding this comment.
I agree with other comments here, using a symbol doesn't seem justified. An argument could be made for #handle/kHandle which is exported as a symbol anyway (although that would make possible for consumers to change the handle with another object, we'd have to make sure it won't introduce issues; I'd stick with the original code to not take any risk), but I suggest reverting changes to the #map private property.
Sorry, something went wrong.
There was a problem hiding this comment.
nit: it seems a good candidate for optional chaining
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM as long as kHandle is never exported to user-land (which seems to be the case).
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. Worth a benchmark of either quic or perf_hooks since those use this?
Sorry, something went wrong.
|
perf_hooks benchmark:https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/785/ |
Sorry, something went wrong.
|
Not sure if perf_hooks exercised the code here, but the results are good. 07:21:09 perf_hooks/bench-eventlooputil.js method='ELU_passed' n=1000000 -0.53 % ±2.23% ±2.97% ±3.87% 07:21:09 perf_hooks/bench-eventlooputil.js method='ELU_simple' n=1000000 0.26 % ±3.09% ±4.12% ±5.37% 07:21:09 perf_hooks/bench-eventlooputil.js method='idleTime' n=1000000 0.91 % ±4.78% ±6.36% ±8.28% |
Sorry, something went wrong.
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: nodejs#36455 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36455 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36455 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36455 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist