3 ms·
Not identical but related: do compilers tune with the OS to get code and data into L1 cache? I believe so, I want to believe you can compile to avoid mem fetch,
by ggm 5y ago
Not identical but related: do compilers tune with the OS to get code and data into L1 cache? I believe so, I want to believe you can compile to avoid mem fetch, let alone disc. E.g. if I know my AES needs a 20k table, does the compiler know how to make this apparent to the CPU farm so its never out of L1?
I continue to believe a 2cpu 1mb L1 cache is faster than 2 cpu, 2HT, 512k L1 cache. 4x fake CPUs and less L1 doesn't beat true cpu and lots of cache on die. But, I might be wrong!
- adrianN 5y agoProfile guided optimization can help compilers put data in the right place, but in general compilers are not very good at that.
- ggm 5y agoA Friend was writing a tester (UDP dns, preformed packets) and said he was able to code it so the entire test program fitted in L1. He then did some work on cpu affinity, for this code and for the IP stack. IP fits in amazingly small space, 25k in pdp11 pre-risc architecture. I think he said he was saturating multi gigabit links. Lot of hand coding going on however. Probably asm.
- deleted 5y ago[deleted]