Repository navigation
Avoid five-argument Math.min/max calls in Util.axialAlignedBoundingBox - #22290
Conversation
Math.min/Math.max with more than 4 arguments aren't optimized by SpiderMonkey (see tryAttachMathMinMax in CacheIR.cpp); this makes Util.axialAlignedBoundingBox ~3.4x faster in Firefox, no change in V8.
Reference testsResults for 552de2c (run, references from mozilla/pdf.js.refs@6cc7acf45c).
The report is kept for 30 days and replaced by the next run. |
Viewer preview🗑️ Viewer previews removed. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22290 +/- ##
==========================================
- Coverage 90.46% 90.46% -0.01%
==========================================
Files 277 277
Lines 68274 68274
==========================================
- Hits 61766 61764 -2
- Misses 6508 6510 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Snuffleupagus
left a comment
There was a problem hiding this comment.
Have you checked that there are no other spots in the code-base that would benefit from the same change?
Would it make sense to add a custom ESLint rule to enforce this pattern?
r=me, thanks.
I haven't but I checked and I didn't find anything.
Done in a second commit.
|
Math.min/Math.max with more than 4 arguments aren't optimized by SpiderMonkey (see tryAttachMathMinMax in CacheIR.cpp); this makes Util.axialAlignedBoundingBox ~3.4x faster in Firefox, no change in V8.