immutable-js-oss / immutable-js

Immutable persistent data collections for Javascript which increase efficiency and simplicity.
https://immutable-js-oss.github.io/immutable-js/
MIT License
37 stars 6 forks source link

Investigate performance regression in Set#map() #213

Closed Methuselah96 closed 3 years ago

Methuselah96 commented 3 years ago

See https://github.com/immutable-js-oss/immutable-js/issues/210 for why this issue exists. See https://github.com/immutable-js-oss/immutable-js/pull/211 for the code used in the benchmark.

image

Methuselah96 commented 3 years ago

Results after running outside of a VM:

image

Methuselah96 commented 3 years ago

Looked into this quite a bit and tried a few alternative implementations (none of which had a definitive advantage over the current approach). At the end of the day, I'm not confident in the way that we are measuring performance (even with the same code, I've often seen benchmark differences of 10% and more). I am working on a more comprehensive strategy to determine what our overall performance goals are.

I re-ran some of the benchmarks outside of a VM context with slightly less worrying results (see screenshot below). Since we don't have a comprehensive plan of what performance levels are acceptable, I'm closing this for now (with a new issue to comes soon to discuss strategies for determining what our performance goals are: https://github.com/immutable-js-oss/immutable-js/issues/214).

image