[tor-bugs] #16811 [Tor]: Mark TestingTorNetwork PREDICT_UNLIKELY

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Aug 14 02:24:17 UTC 2015


#16811: Mark TestingTorNetwork PREDICT_UNLIKELY
-----------------------------------+------------------------------------
 Reporter:  teor                   |          Owner:
     Type:  enhancement            |         Status:  new
 Priority:  normal                 |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor                    |        Version:
 Keywords:  SponsorS, lorax, easy  |  Actual Points:
Parent ID:                         |         Points:
-----------------------------------+------------------------------------
 I'd like to see every instance of:
 `if (options->TestingTorNetwork) {` (or similarly, `get_options()->`)
 transformed to:
 `if (PREDICT_UNLIKELY(options->TestingTorNetwork)) {`

 This should give us a slight performance boost in relays and authorities,
 at the cost of a slight slowdown due to missed branch predictions in test
 networks.

 This would be best done using a coccinelle, perl, or sed script.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16811>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list