Skip to content

Instantly share code, notes, and snippets.

@yury
Created September 21, 2013 10:38
Show Gist options
  • Save yury/6649322 to your computer and use it in GitHub Desktop.
Save yury/6649322 to your computer and use it in GitHub Desktop.
Your version
ruby benchmarks/encoding.rb
Rehearsal ---------------------------------------------------------
positive encode: 2.730000 0.010000 2.740000 ( 2.725146)
positive can_encode?: 2.470000 0.000000 2.470000 ( 2.472397)
negative encode: 3.440000 0.000000 3.440000 ( 3.446421)
negative can_encode?: 2.580000 0.000000 2.580000 ( 2.578184)
common encode: 1.730000 0.000000 1.730000 ( 1.732213)
common can_encode?: 0.540000 0.000000 0.540000 ( 0.544492)
----------------------------------------------- total: 13.500000sec
user system total real
positive encode: 2.740000 0.000000 2.740000 ( 2.742134)
positive can_encode?: 2.450000 0.000000 2.450000 ( 2.450048)
negative encode: 3.440000 0.000000 3.440000 ( 3.441110)
negative can_encode?: 2.550000 0.000000 2.550000 ( 2.557917)
common encode: 1.740000 0.010000 1.750000 ( 1.739130)
common can_encode?: 0.550000 0.000000 0.550000 ( 0.542363)
Current git version:
ruby benchmarks/encoding.rb
Rehearsal ---------------------------------------------------------
positive encode: 0.960000 0.000000 0.960000 ( 0.956984)
positive can_encode?: 0.010000 0.000000 0.010000 ( 0.014623)
negative encode: 1.540000 0.000000 1.540000 ( 1.532644)
negative can_encode?: 0.010000 0.000000 0.010000 ( 0.018297)
common encode: 0.360000 0.000000 0.360000 ( 0.358792)
common can_encode?: 0.010000 0.000000 0.010000 ( 0.010486)
------------------------------------------------ total: 2.890000sec
user system total real
positive encode: 0.950000 0.000000 0.950000 ( 0.947739)
positive can_encode?: 0.020000 0.000000 0.020000 ( 0.014418)
negative encode: 1.530000 0.000000 1.530000 ( 1.535480)
negative can_encode?: 0.020000 0.000000 0.020000 ( 0.018089)
common encode: 0.360000 0.000000 0.360000 ( 0.360162)
common can_encode?: 0.010000 0.000000 0.010000 ( 0.009587)
ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment