Summary: | op_stricteq is slow | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Cameron Zwarich (cpst) <zwarich> | ||||||
Component: | JavaScriptCore | Assignee: | Maciej Stachowiak <mjs> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 20813 | ||||||||
Attachments: |
|
Description
Cameron Zwarich (cpst)
2008-09-12 18:04:37 PDT
Created attachment 23619 [details]
more speedups for the CTI case
Comment on attachment 23619 [details]
more speedups for the CTI case
+ (JSC::Machine::cti_op_stricteq): Check for pointer equality first; use inline version
+ of strictEqualSlowCase; remove unneeded exception check.
I don't see any "check for pointer equality first" change.
- r[dst] = jsBoolean(reinterpret_cast<intptr_t>(src1) == reinterpret_cast<intptr_t>(src2));
+ r[dst]= jsBoolean(reinterpret_cast<intptr_t>(src1) == reinterpret_cast<intptr_t>(src2));
Should change this back. No reason to delete the space before that "=".
- if (JSImmediate::isEitherImmediate(src1, src2) & (src1 != JSImmediate::from(0)) & (src2 != JSImmediate::from(0)))
+ if (JSImmediate::isEitherImmediate(src1, src2) & (src1 != JSImmediate::zeroImmediate()) & (src2 != JSImmediate::zeroImmediate()))
JSImmediate::from(0) doesn't get constant folded?
r=me
(In reply to comment #2) > (From update of attachment 23619 [details] [edit]) > + (JSC::Machine::cti_op_stricteq): Check for pointer equality first; use > inline version > + of strictEqualSlowCase; remove unneeded exception check. > > I don't see any "check for pointer equality first" change. Oh right, I had to back that out after writing the ChangeLog because it was wrong for NaN. I'll fix ChangeLog too. > > - r[dst] = jsBoolean(reinterpret_cast<intptr_t>(src1) == > reinterpret_cast<intptr_t>(src2)); > + r[dst]= jsBoolean(reinterpret_cast<intptr_t>(src1) == > reinterpret_cast<intptr_t>(src2)); > > Should change this back. No reason to delete the space before that "=". > I fixed that. > - if (JSImmediate::isEitherImmediate(src1, src2) & (src1 != > JSImmediate::from(0)) & (src2 != JSImmediate::from(0))) > + if (JSImmediate::isEitherImmediate(src1, src2) & (src1 != > JSImmediate::zeroImmediate()) & (src2 != JSImmediate::zeroImmediate())) > > JSImmediate::from(0) doesn't get constant folded? > I think both get constant folded, but I figued it was better style to use zeroImmediate(). Created attachment 23624 [details]
inline JIT the fast paths of the strict equal operator
Comment on attachment 23619 [details]
more speedups for the CTI case
unflagging since this is landed
|