-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Existential crisis with collections.ts #83161
Labels
UI
We make the game less playable, but with round edges
Comments
Do you have a copy of the 516 alpha? running these on edge/webkit might expose the speedups they were claiming existed. |
I do, I'll give them a shot there. I expect the leap from ie11 -> blink123 to be so monumental that the speed difference will be unnoticeable / unnecessary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Summary
These helpers are offered as faster alternatives. They are not. Here are some of my benchmarks, done in the byond browser using webpack, swc, esbuild just like our current setup.
expand
Details: array of 10000 containing 1, 2, 3, ...Custom filter execution time: 0.3000000000000007
Built-in filter execution time: 0.09999999999999964
Custom filter execution time: 0.29999999999999893
Built-in filter execution time: 0.10000000000000142
Custom filter execution time: 1.5999999999999996
Built-in filter execution time: 0.6999999999999993
Custom map execution time: 0.29999999999999893
Built-in map execution time: 0.20000000000000106
Custom map execution time: 0.5999999999999996
Built-in map execution time: 0.20000000000000106
Custom reduce execution time: 0.29999999999999893
Built-in reduce execution time: 0.20000000000000106
Custom reduce execution time: 0.3000000000000007
Built-in reduce execution time: 0.09999999999999964
Custom reduce execution time: 0.1999999999999993
Built-in reduce execution time: 0.10000000000000053
Custom sortBy execution time: 2.8000000000000007
Built-in sort execution time: 0.7999999999999972
Custom sortBy execution time: 2.799999999999999
Built-in sort execution time: 0.9000000000000003
Custom sortBy execution time: 2.7
Built-in sort execution time: 0.9000000000000003
I dislike having another version of the standard lib offered alongside because needless difference creates needless confusion. I propose removing them.
Reproduction:
I made a repo, just clone it and follow instructions:
https://github.com/jlsnow301/react-swc-webpack
The text was updated successfully, but these errors were encountered: