Comment #90 on issue 164 by Be.DaveStein: Wrong order in Object properties interation
http://code.google.com/p/v8/issues/detail?id=164
Tim, I think the major thing regarding that qustion is none of us really know or can know. I doubt there's a data source of x websites using objects in such a way. However this issue hits me the same way every time so I suppose we can extrapolate one instance where it would be common. I frequently use objects which I iterate through to print out a list that is sortable. I make the property an ID to easily go back and forth between functions and access the right data. As mentioned earlier, it's much easier to do obj[x] than loop through an array until finding the target. This makes the "underscore fix" the best choice for me, but that creates needless lines of code.
So now I wonder, how many people do this for that reason? What other reasons are there for a developer to code this way that would seem completely logical? There are probably countless real-world examples that can be given, but I don't know them.
My question is, has anyone tested the speed difference of object iteration, including extra lines to handle the differences? For instance, instead of just iterating, now I need to iterate and substr. I then need to append back the _ at a later point. It seems to me that the iteration itself may be faster, but not necessarily all operations put together. I'm guessing synthetic bookmarking must be that much faster for people to be so strongly for it, but throwing this out there anyway.
-- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
