mjs at apple.com
Thu May 28 16:15:24 PDT 2009
On May 28, 2009, at 10:35 AM, Zoltan Herczeg wrote:
> we plans to make a super instruction for floor(expr1/expr2), which
> is an
> integer division (if both operands are integer numbers). We hope it
> be benficial for embedded systems. I think the implementation would be
> similar to the JS apply() function: the fast case detects whether both
> operands are integer numbers and the function JSCell refers to the
> floor function. The slow case would be the original SF byte code
> (the fast
> case has a jump to the end of the slow case).
> Do other ports interested in such super instruction? Where would be
> to detect these kind of expressions: in AST level or in SF byte code
> (as a peephole optimization)?
We've considered adding guarded optimized cases for many Math
functions. Oliver hunt can probably tell you about his thinking on
these. I think the right place to do that level of optimization would
be at the AST level, given the fairly complex relationship and
dependency on specific symbol names.
More information about the webkit-dev