Comment #104 on issue 164 by Be.DaveStein: Wrong order in Object properties interation
http://code.google.com/p/v8/issues/detail?id=164

An actual quote of what was said to me was:

"Not only does it use more RAM, but it also
makes things slower because there will be more memory to deal with
when performing garbage collections."

Not listing which dev put that since he was kind enough to answer an e-mail, I'd be a prick if everyone started bombarding him for it.

I think they are under the assumption most uses of objects don't require object iteration. For instance I probably have defined 50 objects on a certain page, but only a couple require order. Therefore I only need an additional 2 arrays to make a proper mapping. This instead of having all 50 objects care about order, when it's not required at all times. So basically we have to put the extra leg work in when it's needed, which isn't ( I'm assuming ) a majority of the time. The reason Chrome didn't benchmark is because the thought of using up memory when a user did not need it used was a practice they did not want to follow.

It's not just "saving memory just to use it up later." If your app isn't refreshing the page once, it's saving memory to have it available later. There is a limit to what can be done in a browser, and the chief limiter is memory. The more we have to work with the more the app can be doing at once.

Also the ECMA proposal sitting around is currently to make the way Chrome does it the standard, not the other way around. http://wiki.ecmascript.org/doku.php?id=strawman:enumeration

As noted by just about everyone here, no one on the Chrome team is reading/responding to this thread. No matter which side of the debate you are on I would believe our time would be better spent going over there than here. Otherwise we are just talking to ourselves.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to