Comment #7 on issue 3696 by [email protected]: Add fast path for smis to
Number.isInteger()
https://code.google.com/p/v8/issues/detail?id=3696
I would hope that my examples are not "hard" with the right set of
optimizations. I don't think it should require a special pattern match.
dart2js would benefit from the Math.floor case.
I see a lot of CFG diamonds from Smi checks (A) in generated code which are
followed by Smi checks on either the same input or a derived input. These
could be rewritten:
if A
B;
else
C;
D;
if A
E;
else
F;
-->
if A
B;
D;
E;
else
C;
D;
F;
In the 'x is Smi' branch the following simplification rules could be
applied:
x | 0 --> x
Math.floor(x) --> x
x == x --> true
The Smi fast path would then come out in the wash. No 'proof' is
required. This is where I draw the line.
Number.isInteger() is interesting (for the future) but should be
susceptible to the above approach without hand-optimization.
--
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/d/optout.