summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Python
diff options
context:
space:
mode:
authorbabenko <[email protected]>2026-06-18 12:20:33 +0300
committerbabenko <[email protected]>2026-06-18 13:04:31 +0300
commit50fd836ab1e51d127495bb37dab3888b27e0ce09 (patch)
treee4a8dc2c602ed40cd469454aea2accefa18dec09 /contrib/tools/python3/src/Python
parentf15b5bcca9bba4b16bc71f92e33a8e67cfba1bf4 (diff)
Add TTscp::GetApproximate
TTscp::GetApproximate takes the processor id from the rseq fast path (GetCurrentCpuId) and the instant from a non-serializing rdtsc, instead of the single serializing rdtscp of TTscp::Get. TPerCpuGauge::Update switches to it: the per-shard timestamp only orders writes across shards to pick the freshest value, so the lower precision is fine. Update is virtual and now YT_PREVENT_TLS_CACHING -- the fiber-TLS boundary the inlined rseq read needs. #### Benchmark sas2-2769 (glibc 2.31 + tcmalloc, rseq fast path), median of 5: | primitive | time | |---|---| | TTscp::Get() (rdtscp) | 14.1 ns | | TTscp::GetApproximate() (rseq + rdtsc) | 10.6 ns (-25%) | commit_hash:b277b6551accd6d0b879f8ffb168bcbe8d9fbb74
Diffstat (limited to 'contrib/tools/python3/src/Python')
0 files changed, 0 insertions, 0 deletions