3 ms·
Invariant (Constant) TSC is detectable via `cpuid` and applies to `rdtsc/rdtscp` by default. In that aspect, there's no tradeoff being made there (observable to
by kprotty 3y ago
Invariant (Constant) TSC is detectable via `cpuid` and applies to `rdtsc/rdtscp` by default. In that aspect, there's no tradeoff being made there (observable to software) AFAICK.
- lazide 3y agointeresting results! i guess it depends in if you consider 35ish cycles expensive or not. [https://community.intel.com/t5/Software-Tuning-Performance/High-impact-of-rdtsc/m-p/1092539#M5675 https://community.intel.com/t5/Software-Tuning-Performance/H...]
- kprotty 3y agoAre there cheaper ways of getting elapsed time with sub microsecond precision? Interested as I've only ever heard of rdtsc at the lowest level in userspace for x86.
- lazide 3y agoI ran across a random stackoverload thread with benchmarks claiming it was about 2x the cost of doing a naive gettime(). But frankly, hard to figure out when you factor in all the various caches, OO execution pipelines, etc,