r-lyeh-archived / ltalloc

LightweighT Almost Lock-Less Oriented for C++ programs memory allocator
BSD 3-Clause "New" or "Revised" License
164 stars 16 forks source link

pause and skylake #15

Closed gjaegy closed 6 years ago

gjaegy commented 6 years ago

Hi, I have heard the performance of the pause instruction is pretty bad on skylake processors (see https://aloiskraus.wordpress.com/2018/06/16/why-skylakex-cpus-are-sometimes-50-slower-how-intel-has-broken-existing-code/).

I haven't tested this myself however.

So, since ltalloc relies on that instruction, do you think it would make sense to use another primitive (for instance, critical sections on Windows) ?

What would be your first feeling ?

gjaegy commented 6 years ago

[edit] i realized critical sections might actually use that pause instruction in their implementation, so forget about that one :D

r-lyeh commented 6 years ago

hey @gjaegy thanks for the feedback :)