Closed Bug 416615 Opened 17 years ago Closed 17 years ago

Optimize JS_MAX(upcase(localMax), downcase(localMax))

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: BijuMailList, Assigned: crowderbt)

References

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

per bug 412047 Comment #21 - jsregexp.c upcase() is slow see bug 412047 Comment #16 optimize JS_MAX() call at http://mxr.mozilla.org/mozilla/source/js/src/jsregexp.c#1058 1057 if (state->flags & JSREG_FOLD) { 1058 c = (jschar) JS_MAX(upcase(localMax), downcase(localMax)); 1059 if (c > localMax) 1060 localMax = c; 1061 } Similar one I noticed is JS_MIN() call at http://mxr.mozilla.org/mozilla/source/js/src/jsobj.h#189 188 #define LOCKED_OBJ_NSLOTS(obj) 189 JS_MIN((obj)->map->freeslot, STOBJ_NSLOTS(obj)) I assume compiler will optimize it.
Blocks: 412047
Attached patch easy fix (obsolete) — Splinter Review
Assignee: general → crowder
Status: NEW → ASSIGNED
Attachment #302620 - Flags: review?(mrbkap)
Keywords: perf
Flags: blocking1.9?
Biju: Yeah, not worried about the JS_MIN case (though that could bite us if/when we ever convert from MACROS to inline functions). :(
Comment on attachment 302620 [details] [diff] [review] easy fix >? .jsapi.h.swp >? .jsinterp.c.rej.swp > ... Edit this stuff out! >Index: config.mk This change is unrelated. r=mrbkap on the rest of it.
Attachment #302620 - Flags: review?(mrbkap) → review+
Attached patch cleaned upSplinter Review
Attachment #302620 - Attachment is obsolete: true
Attachment #302628 - Flags: review+
Attachment #302628 - Flags: approval1.9?
Adding checkin-needed; if/when this patch gets blocking or approval status, land away.
Keywords: checkin-needed
Flags: blocking1.9? → blocking1.9+
jsregexp.c:3.180
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Attachment #302628 - Flags: approval1.9?
Thanks Brian for the fix...
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: