<oembed><type>rich</type><version>1.0</version><author_name>Tomas [ARCHIVE] (npub1rs…9evk4)</author_name><author_url>https://nostr.ae/npub1rsp4w56r24w3zv4xy8zfgesep45qmf9rq6aghxfw3wr7yemqnnwsf9evk4</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-04-07&#xA;📝 Original message:Hi Eric,&#xA;&#xA;On Fri, Apr 7, 2017, at 21:55, Eric Voskuil via bitcoin-dev wrote:&#xA;&gt; Optimization for lower memory platforms then becomes a process of&#xA;&gt; reducing the need for paging. This is the purpose of a cache. The seam&#xA;&gt; between disk and memory can be filled quite nicely by a small amount&#xA;&gt; of cache. On high RAM systems any cache is actually a de-optimization&#xA;&gt; but on low RAM systems it can prevent excessive paging. This is&#xA;&gt; directly analogous to a CPU cache. &#xA;&#xA;&#xA;I am not entirely sure I agree with that, or understand it correctly.&#xA;&#xA;If -for example - the data of some application is a set  of records&#xA;which can be sorted from least frequently used to most frequently used&#xA;then doing just that sort will beat any application-layer cache.&#xA;Regardless of size of data and size of RAM, you simply allow the OS to&#xA;use disk caching or memory map caching to work its  magic .&#xA;&#xA;In fact, I would argue that an application-layer cache *only* makes&#xA;sense if the data model shows a *hard* distinction between often and not&#xA;often used data. If usage-frequency is a continuous line, caching is&#xA;best left to the OS by focussing on proper spatial and temporal locality&#xA;of reference of your data, because the OS has much more information to&#xA;make the right decision.</html></oembed>