Summary: | Possible to optimize out for(var x = 0; x < 500; x++) in JSC? | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | ggaren, mrowe, zwarich |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Description
Eric Seidel (no email)
2007-12-20 04:39:21 PST
Along this same vein: our time spent in LocalVarAccessNode ::evaluateToNumber() in pushing the float value onto the stack for return. We could avoid calling evaluateToNumber() entirely if we could know that evaluateToInt32() would be sufficient. Yay x68 calling conventions! How would you account for x being referenced inside an eval? Any use of "eval" would count as a reference to "x" and would break this optimization. This would obviously require our planned eval tainting. Note that a reference to x could be anywhere inside the same function or in nested function declarations or expressions. Which would mean we'd need to find the enclosing ScopeNode and walk the entire subtree. ick. This is no longer relevant after SquirrelFish. |