From: Charles Oliver Nutter Date: 2008-07-03T22:51:51+09:00 Subject: Re: Threads and Ruby Robert Klemme wrote: > 2008/7/3 Charles Oliver Nutter : >> Actually, it's probably more of a stepping stone toward full native, >> parallel threads. > > That's what I believe, too. > >> And green threads are no faster than regular threads, but are often cheaper >> to create. > > But these days overhead of OS thread creation is negligible. I did > some tests with a Java 6 JVM some time ago and thread creation is > extremely fast - at least on my Windows XP box. :-) It's fast, but it's not nothing...JRuby has a thread pool option (-J-Djruby.thread.pool.enabled=true) that improves thread-spin-up quite a bit. The remaining cost is just because we have heavier in-memory structures per-thread than CRuby does, mostly for performance reasons. Eventually I'd like to trim that down, so that pooled threads results in almost free thread spin-up. - Charlie