Skip to content

Instantly share code, notes, and snippets.

@jonforums
Created November 7, 2011 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonforums/1346345 to your computer and use it in GitHub Desktop.
Save jonforums/1346345 to your computer and use it in GitHub Desktop.
JRuby file reading microbenchmarks
# In all results that follow a 500,000 line test file was read (3) times, first in binary
# modes and then in text mode. Results from a Win7 32bit system with freshly defragmented
# HDD and an Arch Linux system running in a VirtualBox VM.
#
# Benchmark workloads:
# https://github.com/jonforums/measurements/blob/master/workloads/core_brd_filelines_lf.rb
# https://github.com/jonforums/measurements/blob/master/workloads/core_rd_filelines_lf.rb
#
# RCI benchmark runner https://github.com/jonforums/measurements code:
# https://github.com/jonforums/measurements/blob/master/lib/inquisitor.rb#L87-97
# JRuby 1.6.3 wJDK 1.6.0_26 [Win7 32bit]
C:\projects\measurements-git>rci bench core_brd_filelines_lf
jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM) Client VM 1.6.0_26) [Windows 7-x86-java]
Rehearsal ---------------------------------------------------------
core_brd_filelines_lf 2.126000 0.000000 2.126000 ( 2.100000)
------------------------------------------------ total: 2.126000sec
user system total real
core_brd_filelines_lf 2.025000 0.000000 2.025000 ( 2.025000)
C:\projects\measurements-git>rci bench core_rd_filelines_lf
jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM) Client VM 1.6.0_26) [Windows 7-x86-java]
Rehearsal --------------------------------------------------------
core_rd_filelines_lf 3.174000 0.000000 3.174000 ( 3.145000)
----------------------------------------------- total: 3.174000sec
user system total real
core_rd_filelines_lf 3.102000 0.000000 3.102000 ( 3.103000)
# JRuby 1.6.3 wJDK 1.7.0_01 [Win7 32bit]
C:\projects\measurements-git>pik run rci bench core_brd_filelines_lf
jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM) Client VM 1.7.0_01) [Windows 7-x86-java]
Rehearsal ---------------------------------------------------------
core_brd_filelines_lf 1.871000 0.000000 1.871000 ( 1.820000)
------------------------------------------------ total: 1.871000sec
user system total real
core_brd_filelines_lf 1.749000 0.000000 1.749000 ( 1.750000)
C:\projects\measurements-git>pik run rci bench core_rd_filelines_lf
jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM) Client VM 1.7.0_01) [Windows 7-x86-java]
Rehearsal --------------------------------------------------------
core_rd_filelines_lf 3.120000 0.000000 3.120000 ( 3.105000)
----------------------------------------------- total: 3.120000sec
user system total real
core_rd_filelines_lf 3.057000 0.000000 3.057000 ( 3.057000)
# JRuby 1.6.5 wJDK 1.7.0_01 [Win7 32bit]
C:\projects\measurements-git>rci bench core_brd_filelines_lf
jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.7.0_01) [
Windows 7-x86-java]
Rehearsal ---------------------------------------------------------
core_brd_filelines_lf 6.286000 0.000000 6.286000 ( 6.255000)
------------------------------------------------ total: 6.286000sec
user system total real
core_brd_filelines_lf 6.240000 0.000000 6.240000 ( 6.240000)
C:\projects\measurements-git>rci bench core_rd_filelines_lf
jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.7.0_01) [
Windows 7-x86-java]
Rehearsal --------------------------------------------------------
core_rd_filelines_lf 7.722000 0.000000 7.722000 ( 7.706000)
----------------------------------------------- total: 7.722000sec
user system total real
core_rd_filelines_lf 7.769000 0.000000 7.769000 ( 7.769000)
# JRuby 1.6.5 wJDK 1.7.0_01 [Arch Linux VM 32bit]
[jon@archee measurements-git]$ ./rci bench core_brd_filelines_lf
jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.7.0_01) [linux-i386-java]
Rehearsal ---------------------------------------------------------
core_brd_filelines_lf 7.733000 0.000000 7.733000 ( 7.694000)
------------------------------------------------ total: 7.733000sec
user system total real
core_brd_filelines_lf 7.608000 0.000000 7.608000 ( 7.608000)
[jon@archee measurements-git]$ ./rci bench core_rd_filelines_lf
jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.7.0_01) [linux-i386-java]
Rehearsal --------------------------------------------------------
core_rd_filelines_lf 8.005000 0.000000 8.005000 ( 7.968000)
----------------------------------------------- total: 8.005000sec
user system total real
core_rd_filelines_lf 7.885000 0.000000 7.885000 ( 7.885000)
# JRuby 1.6.6 wJDK 1.7.0_02 [Win7 32bit]
C:\projects\measurements-git>rci bench core_brd_filelines_lf
jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) Client VM 1.7.0_02) [Windows 7-x86-java]
Rehearsal ---------------------------------------------------------
core_brd_filelines_lf 1.732000 0.000000 1.732000 ( 1.716000)
------------------------------------------------ total: 1.732000sec
user system total real
core_brd_filelines_lf 1.638000 0.000000 1.638000 ( 1.638000)
C:\projects\measurements-git>rci bench core_rd_filelines_lf
jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) Client VM 1.7.0_02) [Windows 7-x86-java]
Rehearsal --------------------------------------------------------
core_rd_filelines_lf 3.089000 0.000000 3.089000 ( 3.074000)
----------------------------------------------- total: 3.089000sec
user system total real
core_rd_filelines_lf 2.995000 0.000000 2.995000 ( 2.995000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment