TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Bélády's Anomaly

66 pointsby idilivover 4 years ago

2 comments

oso2kover 4 years ago
It&#x27;s a good thing that FIFO isn&#x27;t the only Memory &amp; Cache Replacement Strategy [0]. Way back when, I wrote a Cache Simulator in HTML+JS [1][2]. Hasn&#x27;t aged well; you used to be able to drag and drop a list a file containing a list of addresses. I ought to clean it up and make it functional again.<p>I&#x27;ve sometimes wondered if a Cache Line Size-aware Strategy could significantly improve Garbage Collection. I&#x27;ve mentally toyed with the idea of a Linked List of bitmaps of Arenas (made of Cache Line Sized chunks) with a Reference Counter bitlist could improve GC performance. It could even be extended for use in non-OOP languages with the GCC RAII Cleanup Extension [3], even for primitive and other non-OOP types.<p>[0] <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Cache_replacement_policies" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Cache_replacement_policies</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;lpsantil&#x2F;CacheSimulator&#x2F;blob&#x2F;master&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lpsantil&#x2F;CacheSimulator&#x2F;blob&#x2F;master&#x2F;index...</a><p>[2] <a href="http:&#x2F;&#x2F;lpsantil.github.io&#x2F;CacheSimulator&#x2F;" rel="nofollow">http:&#x2F;&#x2F;lpsantil.github.io&#x2F;CacheSimulator&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Resource_acquisition_is_initialization#Compiler_%22cleanup%22_extensions" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Resource_acquisition_is_initia...</a>
garmaineover 4 years ago
Maybe it&#x27;s 4am and I ought to sleep, but I&#x27;m having trouble understanding this article.<p>Is this phenomenon the same reason some PC game engines render objects in alternating reverse order each frame, rather than something theoretically more optimal like depth-sorted? I understand that in the case of 3D graphics if the textures don&#x27;t fit in the GPUs memory, FIFO ordering will cause ALL textures to be ejected every frame as you cycle through the same objects in the same order, whereas reversing the order every frame means just the same batch of overflow textures &quot;at the end&quot; will get ejected every other frame.
评论 #25790258 未加载