From: Na Na Date: 2013-01-14T22:54:15+09:00 Subject: Re: Garbage Collection and Fibers I have some silly preference against JRuby. For some reason I don't like java, and it's a purely aesthetic dislike. Not even anything to do with the look of the language! I did test JRuby out though. I'm using a perlin noise gem that's been built as a c extension, and it's quite fast. Unfortunately it didn't work with jruby, and a jruby compatible gem was significantly slower. I need this speed, and don't want to rewrite it myself in java (if that turns out to be fast enough anyway). I have heard that GC is improved in ruby 2.0. >You will of course need to refactor, but the result will be better, > and you will learn a lot in the process. This I think will be very true! I need to learn how to profile the Garbage Collector, and find out the hotspots where I'm doing a lot of objection creation and deletion. I have heard a rumour that using for-in rather than .each involves more object creation and deletion, but I don't know if that's true. It will be one of the things I'll be testing to see if it helps improve performance. > Is it really the > number of garbage to collect which makes things slow or maybe low > memory leading to paging I think your suggestion here is that system memory is running out, so garbage collection is using a hard drive based swap file. If that's what you mean, I suspect that's not the issue since I have 8GB memory on my system, my app seems to use < 500MB right now, and I don't think I have enough unrelated loaded apps. I'm on mac os x and 'free' doesn't seem to work to tell me memory usage, so I can't be sure :) I will keep this in mind though. -- Posted via http://www.ruby-forum.com/.