-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Object property delete/set in loop got very slow in Node 12 (quadratic?) #28571
Comments
You should consider posting this to the V8 issue tracker. |
I also noticed that trying to run this code in node v10 and newer with |
@nodejs/v8 |
Filed on V8 tracker: https://bugs.chromium.org/p/v8/issues/detail?id=9442 |
Maybe #31957 fixes this? |
Yup, looks like that fixed it on master. I built Node at that commit and the immediately previous one and ran the benchmark again:
It still slows down at larger sizes, but nearly as much as at the previous commit:
|
I was benchmarking different data structures and noticed a huge slowdown for the following test case:
The performance of object and Map is roughly the same in Node 11.15.0. In Node 12, the object version gets really slow (~10x slower for a 100-element object, ~60x slower for a 1000-element object).
Here's my full test case:
"package.json"
"main.js"
Results
The text was updated successfully, but these errors were encountered: