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.

6 Line EventMachine Bugfix = 2x faster GC, 13x requests/sec

107 pointsby EvilTroutabout 16 years ago

6 comments

rcoderabout 16 years ago
And this, kids and kid-ettes, is why having someone who knows their way around your C compiler, assembler, and debugger on your team can be worthwhile, even if you're working in a high-level language like Ruby.
评论 #585275 未加载
评论 #585822 未加载
评论 #586061 未加载
评论 #585469 未加载
cpercivaabout 16 years ago
This is why I hate garbage collection -- it tends to break horribly as soon as someone does anything unexpected. Using 800 kB of stack is an incredibly dumb thing to do (not as bad on a 64-bit system as it is on a 32-bit system, admittedly), but it still shouldn't cause a huge drop in performance.
评论 #585219 未加载
评论 #585176 未加载
评论 #585220 未加载
评论 #585127 未加载
评论 #585234 未加载
评论 #586530 未加载
abstractbillabout 16 years ago
The real question is, why does Ruby still use a mark-and-sweep GC?
评论 #585274 未加载
gojomoabout 16 years ago
The local fix is nice, but I would be tempted to offer a solution for all code that does the same thing -- put a big chunk of GC-opaque data on the stack. It might take the form of informing the garbage collector: skip this range.
jacktangabout 16 years ago
Well, one of my friends drop me one formula. Let x to be the rate of GC time out of total running time, and we can get<p>(1-2x) * 14 = 1- x =&#62; x = 13/27<p>which means now ruby spends 13/27 time on GC, fast enough? (before patch, it spends 26/27 time on GC, really bad)
评论 #585764 未加载
dinkumthinkumabout 16 years ago
This was a very interesting discussion.