[patch/rfc] Tweak bcache performance
Mon Nov 3 19:07:00 GMT 2003
- adds a comparison of bcache and hashtab.[hc]
Summary: bcache has significantly less memory overhead
- tweaks the bcache algorithm to eliminate the one performance -ve
Summary: all memcmp's eliminated
- exploits an assumption that nothing is bigger than 64k
Summary: I figure stuff bigger than 64k shouldn't be in memory :-)
As for the tweak making a measurable difference, for "file gdb" it is
slight (approx 0.780s vs 0.773s) but still there.
Daniel, does this answer your hashtab VS bcache question? :-)
Comments? Baring them, I'll commit in a few days.
PS: The stats.
Cached 'partial symbol cache' statistics:
Total object count: 36924
Unique object count: 15935
Percentage of duplicates, by count: 56%
Total object size: 886176
Unique object size: 382440
Percentage of duplicates, by size: 56%
Max entry size: 24
Average entry size: 24
Median entry size: 24
Total memory used by bcache, including overhead: 526316
Percentage memory overhead: 37%
Net memory savings: 40%
Hash table size: 4099
Hash table expands: 3
Hash table hashes: 52294
Half hash misses: 0
Hash table population: 97%
Median hash chain length: 4
Average hash chain length: 3
Maximum hash chain length: 12
Notice how the half hash miss is zero. This indicates that, on real
data, all unnecessary memcmp's were eliminated!
Also notice how everything is 24 bytes in size (psymbol) because GDB
isn't written in C++ :-(
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Gdb-patches