diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-12-13 09:34:20 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-13 09:46:58 -0500 |
commit | 219c969d7bf858c4df5fc6ee9b0c472a525b6b2a (patch) | |
tree | 2b3aa9585fe033c4c2a9a074e8ad90f5d0bead05 /autogen.sh | |
parent | dd6dec2665af9964d8f940c27f3f0815a649424a (diff) | |
download | tor-219c969d7bf858c4df5fc6ee9b0c472a525b6b2a.tar.gz tor-219c969d7bf858c4df5fc6ee9b0c472a525b6b2a.zip |
Use monotime_coarse for transfer times and padding times
Using absolute_msec requires a 64-bit division operation every time
we calculate it, which gets expensive on 32-bit architectures.
Instead, just use the lazy "monotime_coarse_get()" operation, and
don't convert to milliseconds until we absolutely must.
In this case, it seemed fine to use a full monotime_coarse_t rather
than a truncated "stamp" as we did to solve this problem for the
timerstamps in buf_t and packed_cell_t: There are vastly more cells
and buffer chunks than there are channels, and using 16 bytes per
channel in the worst case is not a big deal.
There are still more millisecond operations here than strictly
necessary; let's see any divisions show up in profiles.
Diffstat (limited to 'autogen.sh')
0 files changed, 0 insertions, 0 deletions