3 ms·
> C assumes you have one big flat address space. Which means you can't talk about caching in C. You used to be able to declare that some variables would live i
by cbd1984 12y ago
> C assumes you have one big flat address space.
Which means you can't talk about caching in C. You used to be able to declare that some variables would live in registers, but if you try that now, compilers ignore you. (As they should, given how easy register scheduling is for a compiler.) But not being able to declare things about cache can hurt you in some loops.
I agree that near and far pointers were a blot on C and it's good that that mess is gone, but the "Big flat address space" is just as much an abstraction as "In-order execution", and C can't let you peel back the covers on either. (Assembly doesn't always let you peel back the covers, either, but that's another topic.)