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.

Getting Garbage Collection for Free

70 pointsby szxalmost 10 years ago

5 comments

Kenjialmost 10 years ago
Misleading title; garbage collection is never free. Better would be &quot;Optimizing the garbage collector&quot; or how about &quot;Using a stop-the-world garbage collector without stopping the world all that much&quot;. I would have liked that. Because the article is good.<p>Also, I am a huge fan of V8. When testing my HTML5 games, V8&#x27;s performance is unmatched across the board.
kazinatoralmost 10 years ago
&gt; <i>Garbage collection done in the idle tasks are hidden from critical, latency-sensitive operations.</i><p>I don&#x27;t believe it. There must be times when the garbage collection in the idle threads needs a critical section. Which is another way of saying keeping other operations out by making them wait.<p>Just because the latency-sensitive operations aren&#x27;t themselves running the GC doesn&#x27;t mean they never have to suffer a delay because of it.<p>It can be very good and all, but hardly free.
评论 #10038508 未加载
geofftalmost 10 years ago
Is this novel to V8? I feel like JVM etc. environments <i>must</i> have done this, but I don&#x27;t know much about this field, and the article doesn&#x27;t say whether there&#x27;s prior work in other language environments.
评论 #10037165 未加载
评论 #10038026 未加载
szxalmost 10 years ago
I wonder how hard it would be to implement something similar on the JVM (e.g. for Clojure games) or in games&#x2F;graphic apps that embed V8.<p>The tricky part seems to be estimating how long garbage collection will take and&#x2F;or the ability to stop GC if vsync is approaching.
评论 #10037089 未加载
评论 #10038576 未加载
mtanskialmost 10 years ago
This seams like the best practical way to schedule garbage collection next to tracking the users eye movements (joke from the Go lang presentation about 1.5 GC).<p>In all seriousness: since the environment is pretty well controlled compared to native, why not exploit it?