3 ms·
>If we are warping our algorithms and coding so much around it, isn't this a sign that the memory abstraction with the current caching scheme is an overly leaky
by Retra 8y ago
>If we are warping our algorithms and coding so much around it, isn't this a sign that the memory abstraction with the current caching scheme is an overly leaky abstraction?
No, because we don't code our programs in the 'language of performance'. Performance of algorithms is always exterior to our abstractions. There's no way to talk about performance without talking about all the things that 'leak'.
Conversely, if you design your algorithms with no consideration for performance, you will not care what the cache does. If you design your algorithms to maximize something they don't literally encode, then you're escaping the abstraction by definition, and side channels become relevant.
In other words, the abstractions don't leak, they are just not up to the task of modeling optimal performance, so you have to use your human brain to do it on the side.
- stcredzero 8y agoPerformance of algorithms is always exterior to our abstractions. From a certain point of view. In other words, the abstractions don't leak, they are just not up to the task of modeling optimal performance If the performance becomes pathological, to the point where the app or system is unusable, then from the point of view of the users, the abstraction is leaking. Let me put it this way. Maybe a flat Random Access Machine isn't the best mental model for certain coding tasks? Maybe there's a way we could have a cleaner abstract model that makes the pathologies visible, yet is a bit more abstract than just thinking about the actual cache?