Note that there is a significant difference between

- const on global scope
- const in local scope
- const in Harmony mode

There first two have never been standardised, and just exist in V8 for
web compatibility. In particular, const semantics in the global scope
is outright insane (it isn't really const), and thus given't much
leeway for additional optimisations. It does, however, necessitate
additional checks, which might be a reason why you actually see a
slowdown.

The third refers to ES6 const, but that isn't yet activated by
default. It hasn't been optimised much yet either.

/Andreas



On 8 October 2014 19:37, Colin Jenkins <[email protected]> wrote:
>> .
>
>
> Hi Jakob, I've got Chrome Version 39.0.2171.13 dev-m now; thanks for
> answering my questions.  I'll give const another go but every time I've
> tried it in the past I've noticed a (significant) slowdown (as I have using
> switch which I completely avoid now).  Thanks again...
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" 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-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" 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.

Reply via email to