<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - Shamaoke</title>
<link>http://snipplr.com/users/Shamaoke/tags/benchmark</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 22:51:31 GMT</pubDate>
<item>
<title>(Ruby) Ring Benchmark</title>
<link>http://snipplr.com/view/46955/ring-benchmark/</link>
<description><![CDATA[ <p>This script creates a ring of arbitrary number of nodes. Every node except the last one have a link to the next created node. The number of nodes is specified through the command line argument. There's a number which is transfered from one node to another. Every time that number is increased by 1. When the program reaches the last node it transfers the control back to the first node (if a second command line argument is greater than 1). The program continues to transfer the number round the ring and increase its value. After it finishes to run the number through the ring it prints out the time of that work.

This script is based on fibers — a Ruby realisation of so-called coroutines. It can serve as an example which demonstrates how fibers works.</p> ]]></description>
<pubDate>Wed, 12 Jan 2011 04:04:59 GMT</pubDate>
<guid>http://snipplr.com/view/46955/ring-benchmark/</guid>
</item>
</channel>
</rss>