4 ms·
I do think you've hit on a point of confusion in the parent, but... In a (hard) real-time system the only thing that matters is the worst-case execution time -
by addaon 4y ago
I do think you've hit on a point of confusion in the parent, but...
In a (hard) real-time system the only thing that matters is the worst-case execution time -- if your worst-case time fits in the allowance you win, if it doesn't you lose.
Adding a cache improves the average case (typically), but hurts the worst case (always) -- your worst case goes from "do expensive operation" to "do lookup in cache, fail, do expensive operation." Even if you parallelize misses ("do lookup in cache | do expensive operation, on cache success cancel expensive operation, on cache miss wait for expensive operation" you're generally adding at least a few operations in the critical path.
- zasdffaa 4y agoYou raise a good point but I would never have thought caching appropriate to an RTS, not that I have any experience with those. But yes.