1. 17
  1. 7

    It’s great to see this article here! I asked Bart write this back in the day, as part of an ACM Queue issue that I was putting together on performance. I think the issue[0] ended up really strong, and I think that Bart’s article has aged well – and I would encourage folks to read the other articles in that issue, which I think have also broadly aged well.

    [0] https://queue.acm.org/issuedetail.cfm?issue=1117389

    1. 2

      I should probably admit I learned of it after glimpsing it posted somewhere on the work chat by Bart himself 🙈

      It’s a great article, it goes a bit beyond generic advice about making sure not to trash the cache and has some actual examples as well as some v cool historical tidbits

    2. 4

      Another cause of needless cache-line swapping is the placebo lock; this makes the programmer feel better but doesn’t really do anything.

      I am guilty of this. Looking back, I usually introduced this problem when I was debugging/troubleshooting some intermittent issue (including effects of rotating screens on Android :-)), and then left the lock/critical section there as ‘feel good’.

      Overall the doc is a good list and just as relevant today as it was back then. Since then, we had 2 different ‘abbreviations’ for hardware-aware programming: “Mechanical Sympathy” and more recent “Data-oriented programming” (where avoiding cache-line swapping and context switches are primary goals).

      1. 1

        Great, great read! Still relevant today. Might be more relevant today as I feel the industry sometimes lacks the discussion and publication of these topics in the mainstream. Forward it to whoever you may