2 ms·
to make it work on my test system running debian, gcc7 I changed the CACHE_HIT_THRESHOLD and fixed errors/warnings gcc choked on: [] joachim ~/src/spectre $
by DyslexicAtheist 9y ago
to make it work on my test system running debian, gcc7 I changed the CACHE_HIT_THRESHOLD and fixed errors/warnings gcc choked on:
[] joachim ~/src/spectre $ diff spectre.c.1 spectre.c
50c50
< #define CACHE_HIT_THRESHOLD(80) /* assume cache hit if time <= threshold */
---
> #define CACHE_HIT_THRESHOLD (100) /* assume cache hit if time <= threshold */
136c136
< (value[0] > 31 && value[0] < 127 ? value[0] : "?"), score[0]);
---
> (value[0] > 31 && value[0] < 127 ? value[0] : '?'), score[0]);
142c142
< }
\ No newline at end of file
---
> }
and compiled it with:
gcc spectre.c -o spectre -march=native -g -O3
(not using -g or -O3 wouldn't work)
CPU:
vendor_id : GenuineIntel
cpu family : 6
model : 142
model name : Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz