Bug 20816 - op_lesseq should be optimized
Summary: op_lesseq should be optimized
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Cameron Zwarich (cpst)
Depends on:
Blocks: 20813
  Show dependency treegraph
Reported: 2008-09-12 16:49 PDT by Cameron Zwarich (cpst)
Modified: 2008-09-14 16:01 PDT (History)
0 users

See Also:

Patch that is a slowdown, but shouldn't be (7.32 KB, patch)
2008-09-12 19:45 PDT, Cameron Zwarich (cpst)
no flags Details | Formatted Diff | Diff
Proposed patch with ChangeLog (8.31 KB, patch)
2008-09-14 15:15 PDT, Cameron Zwarich (cpst)
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Zwarich (cpst) 2008-09-12 16:49:51 PDT
I had tried to create a loop_if_lesseq opcode during the Summer of Code, but it wasn't enough of a win on any of the existing tests (it is a small-win on some of the ones that are already fast). However, the V8 Crypto benchmark benefits greatly from this, so we should consider doing it again, especially since we get an additional gain by making native code for this opcode.

I have a patch to do this, and it gives about a 10% speedup on the Crypto benchmark, but it gives an inexplicable slowdown on Richards, with most of the additional time spent in JSFunction::getCallData(). I am hoping that the coming improvements to function calls will remove this slowdown, and I'll be able to land it. I'll post the patch here so other people can try it out or see if I am doing something wrong.
Comment 1 Cameron Zwarich (cpst) 2008-09-12 19:45:34 PDT
Created attachment 23387 [details]
Patch that is a slowdown, but shouldn't be
Comment 2 Cameron Zwarich (cpst) 2008-09-14 15:15:24 PDT
Created attachment 23418 [details]
Proposed patch with ChangeLog

This is a 9.4% speedup on the Crypto benchmark. It is a random slowdown on Richards, but Maciej says that he is willing to overlook the random (and cyclic) slowdown issues with Richards for now.
Comment 3 Cameron Zwarich (cpst) 2008-09-14 16:01:54 PDT
Landed in r36408.