logoalt Hacker News

Gibbon1 • yesterday at 10:11 PM • 2 replies • view on HN

Processors I mostly write firmware for have little cache at all.

I think cache friendly code also tends to be reason about friendly and debugger friendly. None of that is remotely premature optimization.


Replies

jacquesm • yesterday at 11:50 PM

Even CPUs like the ARM cores have caches, usually 16K, occasionally 32K, and even larger L2 caches (512K).

dataflow • yesterday at 10:14 PM

> I think cache friendly code also tends to be reason about friendly and debugger friendly.

Not sure what examples you have in mind, but the very first things I think of when I hear cache friendly code are cache-blocking and cache-oblivious algorithms, which are quite the opposite of that. See also B-trees vs. binary search trees, etc.

➕ show 1 reply