GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — lib: refactor to use more primordials in internal/histogram.js by RaisinTen · Pull Request #36455 · nodejs/node Conversation
|
|
Why did you change private properties to symbol properties? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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 an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit: it seems a good candidate for optional chaining
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
8c6fb14 to
42a535b
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM as long as kHandle is never exported to user-land (which seems to be the case).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Worth a benchmark of either quic or perf_hooks since those use this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
perf_hooks benchmark:https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/785/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Not sure if perf_hooks exercised the code here, but the results are good. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: nodejs#36455 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
42a535b to
1623aff
Compare
|
Landed in 1623aff |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #36455 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #36455 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: #36455 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.