4 ms·
How can layers be more efficient? Let's see: your computer's multiple layers of caches in the "memory hiearchy" are all extra layers between the processor core
by kazinator 10y ago
How can layers be more efficient?
Let's see: your computer's multiple layers of caches in the "memory hiearchy" are all extra layers between the processor core and memory.
If you were to turn these off, it would be a complete slug.
Layers are faster when they can intelligently:
* filter requests (higher layer blocks some useless request avoiding time-wasting calls into lower layers where the same conclusion will eventually be reached).
* aggregate requests (the higher layer notices that multiple small/incremental requests can be rewritten to an aggregate request that is available in the vocabulary of the lower layer; I/O buffering is a common example of this).
* provide caching (already covered)
* provide bypass. A system with N layers can be faster with N+1 layers if the new layer is able to bypass some of the layers below it in some cases.
* use alternative providers for the lower level services. Related to bypass: for this situation, don't use all these existing layers; go this way instead.