By bloid
via oldmoe.blogspot.com
Published: Aug 21 2008 / 16:51
Ruby 1.9 Fibers are touted as lightweight concurrency elements that are much lighter than threads. I have noticed a sizbale impact when I was benchmarking an application that made heavy use of fibers. So I wondered what If I switched to threads instead? After some time fighting with threads I decided I needed to write something specific for this comparison. I have written a small application that would spawn a number of fibers (or threads) and then would return the time went into this operation. I also recorded the VM size after the operation (all created fibers and threads are still reachable, hence, no garbage collection). I did not measure the cost of context switching for both approaches, may be in another time.
Add your comment
Voters For This Link (10)
-
bloid -
mswatcher -
ashishnayyar911 -
Wayne Conrad -
brennan -
puredanger -
opal21 -
christopherlebrecque -
docmach -
zis