-
Notifications
You must be signed in to change notification settings - Fork 471
Add a few Stdlib helpers #7516
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
base: master
Are you sure you want to change the base?
Add a few Stdlib helpers #7516
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
Certainly useful, my only concern is that Actually they could be implemented without the array allocation: function size(dict) {
let count = 0;
for (let key in dict) {
if (dict.hasOwnProperty(key)) count++;
}
return count;
} |
1696209
to
d2099af
Compare
Done, here's the benchmark. You can see how everything is ~5-10% faster than Object.keys version. Where The |
Try running |
@nojaf I get the following error:
|
Yeah, I've seen this one. |
Let me know if I need to cherry-pick some changes.