Get the latest tech news
Reliably Benchmarking Small Changes – Ankush Menat
Modern OSs and hardware make the task of benchmarking small performance gains difficult
Simultaneous Multi-Threading (SMT) or "Hyper-Threading" is a feature in modern CPUs that allows one core to present itself as two or more hardware execution contexts or "threads". You can avoid this by pinning your process to a single CPU using taskset, if you want even better surety you can reserve certain cores specifically for your benchmarked programs using cset. Fun Fact: The Microsoft engineer that detected the XZ backdoor was trying to quiesce the system for benchmarking and noticed odd results from SSHD.
Or read this on Hacker News