Bug 20816

Summary: op_lesseq should be optimized
Product: WebKit Reporter: Cameron Zwarich (cpst) <zwarich>
Component: JavaScriptCoreAssignee: Cameron Zwarich (cpst) <zwarich>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 20813    
Attachments:
Description Flags
Patch that is a slowdown, but shouldn't be
none
Proposed patch with ChangeLog oliver: review+

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.