odygrd / quill

Asynchronous Low Latency C++ Logging Library
MIT License
1.36k stars 142 forks source link

__rdtscp vs __rdtsc in logger_benchmarks #420

Closed DanielekW closed 3 months ago

DanielekW commented 4 months ago

I have a question to logger_benchmarks. In ns_per_rdtsc_tick() to convert rdtsc to wall time rdtsc() is used while next in benchmark tests rdtscp(&aux) is used. Why in ns_per_rdtsc_tick() you do not use __rdtscp?

odygrd commented 3 months ago

__rdtsc() should have lower overhead. __rdtscp() has an additional serialising barrier, I believe I used it in benchmarks for more accurate results.