Who's afraid of a big bad optimizing compiler?
Who's afraid of a big bad optimizing compiler?
Posted Jul 17, 2019 7:34 UTC (Wed) by wtarreau (subscriber, #51152)In reply to: Who's afraid of a big bad optimizing compiler? by Paf
Parent article: Who's afraid of a big bad optimizing compiler?
So no, it's not irrelevant to performance nor does it only concern those who need to implement their own concurrency primitives. In fact it should be for any developer of concurrent code who notices that his code either gets 20% slower on single-thread performance by just using mutexes at the wrong place, or that the code doesn't scale at all due to excessive cache lines bouncing between cores caused by excess of atomic ops. And sadly there are many people concerned by this, who often discover this the first time from a user report of very bad performance in a corner case.
Please also note that the points there are also valid with signals. And whoever plays with signals to perform various actions (state dump, config reload etc) should be really aware of this before manipulating half-written variables.