News for hackers. Stuff that matters.
Re:JSC loves ES6 by pizlonator on Monday June 05, 2017 @08:55PM (#14493846)
Not necessarily. Map/Set is a counterexample. There’s no substitute for the JIT knowing how to reason about the internal aliasing properties of your hash table implementation.

We’ll keep working on more optimizations for ES-6 so there will be more counter examples.

Re:JSC loves ES6 by fenomas on Monday June 05, 2017 @11:02PM (#14494387)
To be clear, do you mean that Map/Set is faster than {} even for plain idiomatic hashes with string keys (as opposed to pathological cases)?

When I last tested in other JS engines I found plain {} hashes were still moderately faster. (Haven't tried Safari since it doesn't support what I've been working on)

Re:JSC loves ES6 by pizlonator on Monday June 05, 2017 @11:09PM (#14494425)
No, I don't mean that. If you're using string or integer keys, then I think that {} still have a perf advantage.
Re:JSC loves ES6 by netheril96 on Monday June 05, 2017 @10:46PM (#14494316)
But ES6 Map/Set is almost useless as it has no custom hash nor equality function. The key is either numeric, string, or object identity, not anyway better than the builtin {}.
Re:JSC loves ES6 by pizlonator on Monday June 05, 2017 @11:10PM (#14494435)
I've found them to be useful when I write ES6 code. I agree that custom hash and equality functions would make these classes a lot better.
Re:JSC loves ES6 by saamyjoon on Tuesday June 06, 2017 @03:41AM (#14495455)
I agree too. I wonder if this has been discussed at TC39.