From: Tony Arcieri Date: 2011-06-28T08:33:20+09:00 Subject: Re: [ANN] celluloid 0.0.3: a concurrent object framework for Ruby --00032555f472dea2ff04a6b9f9dd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Jun 27, 2011 at 4:23 PM, I=F1aki Baz Castillo wrote= : > Hi, I've taken a look to the code. Does it create a new Thread for > each new call/request? It creates a new fiber for each request, regardless of whether the request is a traditional call (i.e. request/response) or an asynchronous call. The latter was actually broken in the currently released version (0.1.0) but is fixed on github. JRuby implements fibers as native threads, so on JRuby it will create a new thread per request. 1.9.2/YARV and Rubinius both implement Fibers in userspace using various stack manipulation tricks (setjmp/longjmp on YARV, ucontexts on Rubinius) The performance isn't great but it isn't terrible. Some initial performance numbers on my quad i7 Mac: - 1.9.2: 18000 calls/s (475x slower) - JRuby 1.6.2: 5700 calls/s (1400x slower) - rbx-2.0.0pre: 8100 calls/s (1200x slower) These show how many synchronous calls can be made to one of Celluloid's concurrent actors in one second. The "Nx slower" indicates how much slower = a call to a Celluloid actor is as compared to a normal method call. --=20 Tony Arcieri --00032555f472dea2ff04a6b9f9dd--