mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-22 16:25:30 -04:00
b47e28a743
For Dwarf_Abbrev codes, the most common case is that they're packed at the low end, saving uleb128 encoding size. Since the hash table is always resized to be no more than 90% full, those codes are always less than the table size, and dividing for the remainder is unnecessary. Dwarf_Dies are frequently created anew, and need to find abbrev each time, so even that one division becomes a noticeable hotspot. This patch adds a branch to avoid it, which is very predictable for the CPU. Signed-off-by: Josh Stone <jistone@redhat.com>