This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4937] New: RFE: micro-efficiency in symbol lookup for GNU_HASH chains


In glibc-2.6.1/elf/do-lookup.h the test on line 193
    if ((*hasharr & ~1u) == (new_hash & ~1u))
can be evaluated in one fewer temporary register as
    if (0==((*hasharr ^ new_hash) >> 1))
That also saves 1 cycle on a CPU with two-address instructions and only one
execution unit.

Re-writing the same test as
    if (*hasharr == (new_hash | (1u & *hasharr)))
enables the low-order bit of hashes to affect comparisons when the current
member is not the last in the hash chain.  This may increase search speed when a
chain has more than one member.

-- 
           Summary: RFE: micro-efficiency in symbol lookup for GNU_HASH
                    chains
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: jreiser at BitWagon dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=4937

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]