Closed Bug 470684 Opened 16 years ago Closed 15 years ago

Investigate if nsPurpleBuffer::Put could be optimized

Categories

(Core :: XPCOM, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 490695

People

(Reporter: smaug, Unassigned)

References

Details

Attachments

(1 obsolete file)

Attached patch N_INDEX_BITS 26 (obsolete) — Splinter Review
Currently nsPurpleBuffer::Put spills quite a lot, which means that
there are many hashtable .Put() calls, and those are slow.
I've been testing with N_INDEX_BITS 26, in which case mCache has max
52 entries, and that does seem to reduce spilling quite a bit.
(and dromaeo runs a bit faster)

Graydon, Peter, do you know why N_INDEX_BITS 13 is used currently?

Perhaps this has been discussed in some other bug, but couldn't find that.
Erm, unless matters have changed, mCache is 2-associative direct-mapped cache .. at 26 index bits, you'll have 134 million pointers in the array, which on x86 will cost you 536mb on allocation?

mCache is supposed to simply accelerate the backing store; it's a stopgap measure to avoid implementing (or digging up) an actually-fast associative pointer-keyed structure like a cache-optimized digital trie. Say a judy array or the like. That's probably more what you actually want here if you're running into performance problems. Chewing up a ton of memory in the cache to avoid ever touching the backing store sounds much worse to me.
Oops, right. My mistake.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Or not invalid, because the hash operations do show up in the profiles, but
the patch is all wrong.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Attachment #354071 - Attachment is obsolete: true
This should be addressed by bug 490695.
Depends on: 490695
So should we just mark this as dupe of bug 490695?
Status: REOPENED → RESOLVED
Closed: 16 years ago15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: