TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

107 点作者 EvilTrout大约 16 年前

6 条评论

rcoder大约 16 年前
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 未加载
cperciva大约 16 年前
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 未加载
abstractbill大约 16 年前
The real question is, why does Ruby still use a mark-and-sweep GC?
评论 #585274 未加载
gojomo大约 16 年前
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.
jacktang大约 16 年前
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 未加载
dinkumthinkum大约 16 年前
This was a very interesting discussion.