Re: [ANN] threadify-0.0.1
by Charles Oliver Nutter other posts by this author
Jul 1 2008 2:08PM messages near this date
Re: threadify-0.0.1
|
Re: [ANN] threadify-0.0.1
ara howard wrote:
>
>
> this one's for you charlie ;-)
Appears to work just dandy under JRuby:
â?? time jruby --server -rthreadify -e "nums = *(1..35); def fib(n); if n
< 2; return n; else; return fib(n - 1) + fib(n - 2); end; end; nums.each
{|i| p fib(i)}"
...
real 0m11.889s
user 0m11.733s
sys 0m0.188s
~/NetBeansProjects/jruby â?? time jruby --server -rthreadify -e "nums =
*(1..35); def fib(n); if n < 2; return n; else; return fib(n - 1) +
fib(n - 2); end; end; nums.threadify {|i| p fib(i)}"
...
real 0m8.213s
user 0m12.722s
sys 0m0.178s
(One thread on my system consumes roughly 65-70% CPU, which explains why
full CPU on both cores doesn't double performance here)
I also found some weird bug where Thread#kill/exit from within the
thread interacts weirdly with join happening outside, and never
terminates. Fixing that now.
- Cahrlie
Thread:
Ara Howard
Daniel Berger
Ara.T.Howard
Charles Oliver Nutter
Michael Guterl
Charles Oliver Nutter
Michael Guterl
Ara.T.Howard
Charles Oliver Nutter
Charles Oliver Nutter
Ara.T.Howard
Ara.T.Howard
Ara.T.Howard
Charles Oliver Nutter
Martin DeMello
Charles Oliver Nutter
Martin DeMello
Ara.T.Howard
Fedzor
|