Closed Bug 579466 Opened 14 years ago Closed 14 years ago
JM: fast path for JSOP
_MOD on int operands
We do 223331 of these in SunSpider. JM wanted SS win: 9 ms
Integer mod should be done using idiv. Since this requires clobbering %eax and %edx, mod should not be implemented within jsop_binary(), even though its constant-folding function can be used. This is highly non-trivial to implement in the current state if you want fast-paths for (int, double) and (double, int), like jsop_binary() has.
(In reply to comment #1) > This is highly non-trivial to implement in the current state if you want > fast-paths for (int, double) and (double, int), like jsop_binary() has. We only need mod for ints for now.
this path ends up being pretty gross, lots of guards. down to ~11,000 calls to slow::Mod now. looks like a 5.5ms win, though it's not totally clear where this went. the biggest deltas are in users of MOD, though. http://hg.mozilla.org/users/danderson_mozilla.com/moo/rev/4997d6d1141d
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.