Closed Bug 120363 Opened 23 years ago Closed 23 years ago

nsCRT::HashCode(const PRUnichar*) is slow

Categories

(Core :: XPCOM, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Keywords: perf)

nsCRT::HashCode(const PRUnichar*) has shown up on a bunch of profiles as a significant chunk of total time (0.2% on a page load profile, 0.4% on a new window profile). I'd like to make it much simpler and move the current implementation to HashCodeAsUTF8. I don't know of anyone who depends on the behavior that it gives the same hash code as nsCRT::HashCode(const char*) does for the equivalent UTF8 string. scc, do you know of any users who depend on that behavior? There's a patch to do this within attach 65095 on bug 118933.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.9
Keywords: perf
To clarify, the patch to review is the second half (last 2 files, nsCRT.*) of attachment 65095 [details] [diff] [review].
sr=jst
r=jag
Fix checked in 2002-02-16 11:50 PST.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.