Not sure if “don’t freeze objects” as punishment for using an older version of v8 solves the problem, especially if a person’s intent is to prohibit mutation.
So back to my original question, because I think it’s important to understand. Why *was* it 5+ times slower? In the best case, reading a frozen property should be slightly faster. In the worst case it should be exactly the same speed. (Object.freeze, should only intercept writes in an ideal world). Such a performance hit doesn’t make sense unless something horribly wrong was going on in the implementation. I’d just like to understand it. I suppose I could look at the diffs, but that doesn’t explain why it was written the way it was to begin with. -- Thomas Bradford @Kode4Food On 15 October 2014 at 15:32:46, Jakob Kummerow ([email protected]) wrote: Well, as long as you're stuck with a version dating back to roughly the ice age, don't freeze your objects, problem solved. On Wed, Oct 15, 2014 at 2:36 PM, Thom Bradford <[email protected]> wrote: Whatever is latest on Chris Lea's PPA On Oct 15, 2014 2:33 PM, "Jakob Kummerow" <[email protected]> wrote: Works for me: not frozen: 1061 ms frozen: 1054 ms There were some Object.freeze optimizations a couple of months ago. Maybe you're running a very old revision? On Wed, Oct 15, 2014 at 10:45 AM, <[email protected]> wrote: I'm seeing this in Node, but can only assume it's V8 related. Can anyone explain to me why reading an Object's property is considerably slower after calling Object.freeze against that object? It appears to be about 5+ times slower. Thanks, Thom -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" 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-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to a topic in the Google Groups "v8-dev" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-dev/NBn7xwusqDI/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" 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-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to a topic in the Google Groups "v8-dev" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-dev/NBn7xwusqDI/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" 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.
