Opened 3 years ago

Closed 3 years ago

#17544 closed defect (fixed)

Our SipHash-2-4 performance is sometimes odd.

Reported by: yawning Owned by:
Priority: Medium Milestone: Tor: 0.2.8.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: tor-core, performance
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Something is screwed up (probably in the code gen), such that hashing buffers that aren't a multiple of 8 has performance issues.

siphash24g(7): 30.42 ns per call
siphash24g(8): 22.67 ns per call
siphash24g(15): 34.08 ns per call
siphash24g(16): 27.14 ns per call
siphash24g(20): 36.35 ns per call
siphash24g(32): 37.66 ns per call
siphash24g(111): 93.87 ns per call
siphash24g(128): 100.21 ns per call

I'm not sure if deviating from the upstream further to fix this is the right thing to do, but we probably call this code a decent amount.

Child Tickets

Change History (4)

comment:1 Changed 3 years ago by yawning

Version: Tor:

That fixes this, at least on my system.

comment:2 Changed 3 years ago by yawning

Status: newneeds_review

comment:3 Changed 3 years ago by nickm

Priority: LowMedium

Looks okay to me, and the tests passed. Merged it!

comment:4 Changed 3 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.