Skip to content
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

map-set test is not representative #57

Open
sophiebits opened this issue Jan 4, 2017 · 1 comment
Open

map-set test is not representative #57

sophiebits opened this issue Jan 4, 2017 · 1 comment

Comments

@sophiebits
Copy link

In the ES5 variant, the map test sets a fixed key on the object:

map.foo = 'bar';

This means that VMs will optimize it with hidden class optimizations in a way that is useful for objects but not a fair comparison if you intend to use it as an actual hash map. It would be better to use a random string or one with special characters in it so that VMs treat the object as a hash map instead of an object (which they would do in any real-world situation that you might use a Map).

@kpdecker
Copy link
Owner

kpdecker commented Jan 5, 2017

Care to put together some code we could talk about?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants