On Wed, May 7, 2014 at 5:11 AM, Vyacheslav Egorov <[email protected]>
wrote:

> What are the performance characteristics and memory footprint one can
> expect from Map & Set?
>

 The implementation is based on the "deterministic hash table" described at
https://wiki.mozilla.org/User:Jorend/Deterministic_hash_tables.

I would like to point out that a lot of built-in features that V8 and other
> JS VMs implement (e.g. Array.prototype.forEach) are never used because they
> are perceived as slow (and they are actually slow for various reasons).
>
> Can we proactively avoid falling down the same hole with ES6 features?
>
> What about having ES6 features (micro)benchmark suite to drive performance
> of this features across all browsers implementing them?
>

I agree that it's important to keep an eye on performance when adding new
features, and we have done that here. There's a microbenchmark for Map/Set
running on our (currently internal) perf waterfall, and both Erik and
myself have spent some time tweaking the existing implementation with the
goal of speeding that up (e.g., Erik's
https://code.google.com/p/v8/source/detail?r=22027). Further optimization
work has been discussed, but there are some significant hurdles (for
example around the current implementation of the hash codes used for V8
objects).


>
> Vyacheslav Egorov
>
>
> On Tue, May 6, 2014 at 9:22 PM, 'Erik Arvidsson' via v8-users <
> [email protected]> wrote:
>
>> Map & Set are both part of ES6 [1], [2].
>>
>> They are shipping in Firefox since version 13 [3] and Internet Explorer
>> 11 [4]. They are also turned on by default for nightly WebKit/JSC.
>>
>> Adam Klein recently re-implemented the backing hash table used by both
>> Map and Set to use an ordered hash table, which is a requirement for
>> deterministic insertion order iteration. With that we were able to add
>> support for forEach which we saw as a must have for parity with Firefox and
>> Internet Explorer.
>>
>> This is not a full implementation of Map and Set. Most notably it does
>> not include @iterator, entries, values nor keys. This is also the lowest
>> common denominator between IE and FF. We plan to send out further intent to
>> ship emails before we ship the remaining features of Map and Set.
>>
>> Owners: [email protected], [email protected]
>>
>> [1] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-map-objects
>> [2] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-set-objects
>> [3] https://developer.mozilla.org/en-US/Firefox/Releases/13
>> [4] http://msdn.microsoft.com/en-us/library/ie/dn342892(v=vs.85).aspx
>>
>>  --
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to