iteration order for Object

Dean Landolt dean at deanlandolt.com
Fri Mar 11 12:41:00 PST 2011


On Fri, Mar 11, 2011 at 3:14 PM, Charles Kendrick <charles at isomorphic.com>wrote:

> On 3/10/2011 7:33 PM, Boris Zbarsky wrote:
>
>> On 3/10/11 9:58 PM, Charles Kendrick wrote:
>>
>>> 1. tens of thousands of web applications that need to define a sorted
>>> map plus perhaps billions of JSON messages per day
>>>
>>> .. to ..
>>>
>>> 2. a handful of crypto / computational use cases used by a tiny minority
>>> of sites
>>>
>>> What should be optimized for?
>>>
>>
>> It depends on the relative slowdowns, possibly.
>>
>
> Billions of JSON messages vs a handful of sites should be pretty clear cut,
> but I've collected some numbers anyway just to make it more obvious.
>

You've asserted this JSON-advantage claim several times now so you should
probably know that keys in JSON are specifically specified as unordered.
Nothing TC39 does can alter this fact -- it won't (and *can't*) be changed.
Even if ECMAScript were to go this route, nothing says that JSON
implementations will (or must) respect this ordering. Surprises would lurk
around every corner.

[snipped the rest]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110311/d9de84e7/attachment.html>


More information about the es-discuss mailing list