/mobile Handheld Friendly website

 performance measurements

Each table row shows performance measurements for this Ruby JRuby program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
500,000Failed  228   

Read the ↓ make, command line, and program output logs to see how this program was run.

Read thread-ring benchmark to see what this program should do.

 notes

jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) Server VM 1.8.0-b132 +indy [linux-i386]

 thread-ring Ruby JRuby #2 program source code

# The Computer Language Benchmarks Game
# http://benchmarksgame.alioth.debian.org/
#
# contributed by Serhiy Boiko


require 'thread'
THREAD_NUM = 503
number = ARGV.first.to_i

threads = []
for i in 1..THREAD_NUM
   threads << Thread.new(i) do |thr_num|
      while true
         Thread.stop
         if number > 0
            number -= 1
         else
            puts thr_num
            exit 0
         end
      end
   end
end

prev_thread = threads.last
while true
   for thread in threads
      Thread.pass until prev_thread.stop?
      thread.run
      prev_thread = thread
   end
end

 make, command-line, and program output logs

Sat, 29 Mar 2014 23:17:38 GMT

MAKE:
mv threadring.jruby-2.jruby threadring.rb
0.02s to complete and log all make actions

COMMAND LINE:
/usr/local/src/jruby-1.7.11/bin/jruby -Xcompile.invokedynamic=true -J-server -J-Xmn512m -J-Xms2048m -J-Xmx2048m threadring.rb 500000

PROGRAM FAILED 


PROGRAM OUTPUT:

ThreadError: unable to create new native thread
  initialize at org/jruby/RubyThread.java:440
         new at org/jruby/RubyThread.java:389
     __for__ at threadring.rb:13
        each at org/jruby/RubyRange.java:479
      (root) at threadring.rb:12

Revised BSD license

  Home   Conclusions   License   Play