Comment #6 on issue 2741 by [email protected]: max_opt_count is
implemented using the wrong kind of limit
http://code.google.com/p/v8/issues/detail?id=2741
Well of course predicting the future is impossible :( but you have two ways
at the very least to go about doing this depending on your more internal
knowledge of V8 and how its full codegen passes "hot" code to the optimizer.
Depending if the AST is up to the task, just mark it as a loop or piece of
code not worth handing to the optimizer. I'm not intimate with its
structure yet but I'm trying to grok the code and give a more direct
suggestion.
And the more cool option (I think) depending on how much CFG information
you use, using the loop header in the control flow graph to decrease
that "max-opt-count" variable to 0 or 1 on a per-loop node header basis. Or
looking at the sub-nodes inside the loop nodes and disabling/preventing
those specific nodes from being passed to the optimizer as they're only
ever called once per-iteration anyway while neither being in-variant and
hoistable. Like in the case of a PDF parser parsing different data each
iteration, parts could be optimized but the data per parse/render stage
doesn't persist beyond a single call of that specific iteration.
You'd know better at which stage or abstraction level would have more
information about loop length & iteration information to better decide
where such logic to detect the optimizability of a loop's computation
should be placed which also leverages v8's compiler infrastructure. Any
compiler should at least do some sort of loop length/depth optimizations
based on the implemented language limits and semantics. So this is a key
optimization v8 is missing right now which SHOULD show massive benefits in
multiple subsystems based on good engineering, architecture and heuristics,
no divination required :P
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.