On Mon, Jun 3, 2013 at 1:28 PM, Florian Schneider
<[email protected]>wrote:

> I disagree here: I think in a JS world, the "standard" optimizations are
> the big hammer. They also only work really well for C-like switches.
>

But I think we *do* actually have C-like switches in real-world code like
CPU emulators etc., so I think using the standard approaches
(cascade/table/hash) should be superior.


> Collecting dynamic feedback is IMO the light-weight approach to get to
> good performance without spending a lot of time in the optimizing compiler.
> Of course deoptimization needs to be considered carefully, but in general
> counting frequencies in the full-codegen and using them to guide the
> optimizing compiler achieves the performance much easier. [...]
>

We already have problems with recompilation times, and any additional deopt
makes this problem worse. We do have better ways of handling this
statically, so why shouldn't we do this? Deopts are IMHO only good for
situations where one can't statically deduce things and where we have
enough dynamic information to do better. Both condition don't hold here.

The whole approach of doing this right might be a little bit more
complicated than the deopt approach, but it will be more localized and
produce better code.

-- 
-- 
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/groups/opt_out.


Reply via email to