logoalt Hacker News

michalsustrtoday at 7:44 PM3 repliesview on HN

Very cool! Also, huh interesting. I’ve used rdtsc to measure cycle diffs but had no idea its execution takes that long. Is that common across architectures?


Replies

pbsdtoday at 9:09 PM

The cycle count for RDTSC is ~25 cycles on Skylake-era microarchitectures. The 49 number shown in the OP seems off.

inigyoutoday at 7:52 PM

AFAIK it acts as some kind of execution barrier, to give meaningful timing.

show 1 reply