Crate amd64_timer [] [src]



The difference between ticks and ticks_amd is that on AMD processors lfence instruction doesn't always prevent instruction reordering. Instead it is recommended to use the mfence instruction.


The standard ticks and ticks_amd use the rdtsc instruction which as it maybe reordered in respect to other instructions the functions will contain memory fences to attempt to insure relative order. But in some highly sensative benchmarks this may introduce memory overhead, as you enforce cache consistency.