You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use 50% load factor for fDigestForPackedGlyphID table
In certain workloads (e.g. Speedometer3, Editor-TipTap) the
hash-table lookup becomes very expensive and may require up to 25 probes (specifically for `fDigestForPackedGlyphID`). From local
experiments I see that this is not the problem of the hash function,
but rather the load faсtor of the HashTable, which is currently hardcoded to 75%.
The CL provides a way to customize this behaviour by adding an
optional `ShouldGrow(size, capacity)` function into `Traits`. The
function is also specialized for `fDigestForPackedGlyphID` to have
the load factor of 50%. This significantly reduces the number of extra
probes, increasing the ratio of 0-probe hits from 88% to 97% on the
overall Speedometer3 benchmark. No more than 5 probes are required.
The CL improves the Editor-TipTap Speedometer3 story by 1.3%.
Change-Id: Iedda0710839448e8df98d649456a168104488272
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/939016
Commit-Queue: Anton Bikineev <[email protected]>
Reviewed-by: Michael Ludwig <[email protected]>
Reviewed-by: Ben Wagner <[email protected]>
0 commit comments