Status: New
Owner: ----

New issue 1851 by [email protected]: Accessing "const"s from the environment is significantly slower than accessing "var"s.
http://code.google.com/p/v8/issues/detail?id=1851

Here - https://gist.github.com/1431640 - is a simple benchmark that indicates an unexpected performance skew in V8. One would expect accessing symbols declared using "const" to be at least as fast as those declared using "var"s, but in the code linked to, the `constAccess` function runs about 3x slower than the `varAccess` function.

I reproduce my measurements below. All numbers are times in milliseconds and smaller is better.

{{{
My measurements using node.js v0.6.3 on MacOSX -

ctl = {"min":182,"max":187,"mean":183.8,"spread":0.98}
con = {"min":770,"max":789,"mean":774.92,"spread":3.16}
var = {"min":196,"max":253,"mean":224.42,"spread":5.96}

(The spread rounded to two decimal places)
}}}

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

Reply via email to