2015-01-21

Ruby 2.1.5 vs 2.2.0 Performance Benchmark

Ruby 2.2.0 released last christmas (yea, I give you my heart~), and I ain't got any news about it (thanks to Google Alert) -_-|||, ok then let's do the benchmark, yay! :3

Benchmark FileInput Sizeruby-2.1.5 p273ruby-2.2.0 p0Performance Increase
macro-benchmarks/bm_gzip.rb1005.4418007875.529919291-1.62%
macro-benchmarks/bm_hilbert_matrix.rb100.0015066440.001508498-0.12%
macro-benchmarks/bm_hilbert_matrix.rb200.0180345140.019916750-10.44%
macro-benchmarks/bm_hilbert_matrix.rb300.0840658660.088421611-5.18%
macro-benchmarks/bm_hilbert_matrix.rb400.2433687390.257345416-5.74%
macro-benchmarks/bm_hilbert_matrix.rb500.6566729310.665158535-1.29%
macro-benchmarks/bm_hilbert_matrix.rb601.4833529251.499879964-1.11%
macro-benchmarks/bm_mpart.rb3000.0210451940.01858062311.71%
macro-benchmarks/bm_norvig_spelling.rb504.1056013593.8381815196.51%
macro-benchmarks/bm_parse_log.rb1000.5243118240.534461600-1.94%
macro-benchmarks/bm_rcs.rb1000.1673491930.167786871-0.26%
macro-benchmarks/bm_sudoku.rb11.3785271921.3097690034.99%
micro-benchmarks/bm_app_factorial.rb50000.0183778520.01631250311.24%
micro-benchmarks/bm_app_fib.rb300.1547457890.1451332626.21%
micro-benchmarks/bm_app_fib.rb351.7230136991.6511991024.17%
micro-benchmarks/bm_app_mandelbrot.rb10.1508939670.1480295441.90%
micro-benchmarks/bm_app_pentomino.rb120.91605014720.2193213553.33%
micro-benchmarks/bm_app_tak.rb70.1142748990.1081841895.33%
micro-benchmarks/bm_app_tak.rb80.3326020740.3119493296.21%
micro-benchmarks/bm_app_tak.rb90.8925922960.8139617978.81%
micro-benchmarks/bm_app_tarai.rb30.4186696320.3779541919.72%
micro-benchmarks/bm_app_tarai.rb40.5015455500.44657437710.96%
micro-benchmarks/bm_app_tarai.rb50.5704040660.5461785304.25%
micro-benchmarks/bm_binary_trees.rb17.6094919177.742826158-1.75%
micro-benchmarks/bm_cal.rb5000.0411283820.0409776420.37%
micro-benchmarks/bm_count_multithreaded.rb10.0043246640.005010469-15.86%
micro-benchmarks/bm_count_multithreaded.rb20.0091488980.010368676-13.33%
micro-benchmarks/bm_count_multithreaded.rb40.0217645230.01927901811.42%
micro-benchmarks/bm_count_multithreaded.rb80.0456799360.0413018249.58%
micro-benchmarks/bm_count_multithreaded.rb160.0792680710.091182084-15.03%
micro-benchmarks/bm_count_shared_thread.rb10.0404284740.042236155-4.47%
micro-benchmarks/bm_count_shared_thread.rb20.0454026220.0433190784.59%
micro-benchmarks/bm_count_shared_thread.rb40.0463385460.0459357780.87%
micro-benchmarks/bm_count_shared_thread.rb80.0594895940.05279723111.25%
micro-benchmarks/bm_count_shared_thread.rb160.0555088970.062376136-12.37%
micro-benchmarks/bm_dirp.rb100001.0411283391.069316017-2.71%
micro-benchmarks/bm_eval.rb10000006.4859326266.937864716-6.97%
micro-benchmarks/bm_fannkuch.rb60.0012134660.001289357-6.25%
micro-benchmarks/bm_fannkuch.rb80.0914047020.095585812-4.57%
micro-benchmarks/bm_fannkuch.rb1011.69747586712.100328001-3.44%
micro-benchmarks/bm_fasta.rb10000008.5766513358.3082399763.13%
micro-benchmarks/bm_ffi_printf.rb1000000.516967724LoadError
micro-benchmarks/bm_fiber_ring.rb100.0003083440.000332843-7.95%
micro-benchmarks/bm_fiber_ring.rb1000.0133686380.01180348011.71%
micro-benchmarks/bm_fiber_ring.rb10001.9420498531.50377529822.57%
micro-benchmarks/bm_fractal.rb50.5897041520.5393404538.54%
micro-benchmarks/bm_gc_array.rb113.64690203811.94584665612.46%
micro-benchmarks/bm_gc_mb.rb5000000.1384165340.09915606028.36%
micro-benchmarks/bm_gc_mb.rb10000000.2456715630.18143441026.15%
micro-benchmarks/bm_gc_mb.rb30000000.7683781830.66810086213.05%
micro-benchmarks/bm_gc_string.rb12.6184946072.5567723182.36%
micro-benchmarks/bm_knucleotide.rb10.5236778310.5175812411.16%
micro-benchmarks/bm_list.rb10000.0241720780.01986159917.83%
micro-benchmarks/bm_list.rb100000.9060837710.8696842404.02%
micro-benchmarks/bm_lucas_lehmer.rb96890.5232258070.5186681210.87%
micro-benchmarks/bm_lucas_lehmer.rb99410.5623396360.5538516051.51%
micro-benchmarks/bm_lucas_lehmer.rb112130.7501384740.7363778081.83%
micro-benchmarks/bm_lucas_lehmer.rb199372.9216229092.9178080620.13%
micro-benchmarks/bm_mandelbrot.rb17.5683576167.2822736563.78%
micro-benchmarks/bm_mbari_bogus1.rb10.0197005590.020653362-4.84%
micro-benchmarks/bm_mergesort.rb10.4296423510.4041294115.94%
micro-benchmarks/bm_mergesort_hongli.rb30000.6768509260.6738260030.45%
micro-benchmarks/bm_meteor_contest.rb13.8052915023.6300699594.60%
micro-benchmarks/bm_monte_carlo_pi.rb100000002.3594493022.1969672686.89%
micro-benchmarks/bm_nbody.rb1000000.8981084690.8978282680.03%
micro-benchmarks/bm_nsieve.rb92.1775391002.0563559065.57%
micro-benchmarks/bm_observ.rb1000000.3006297050.26813425210.81%
micro-benchmarks/bm_open_many_files.rb500000.2342404970.20007004614.59%
micro-benchmarks/bm_partial_sums.rb25000003.1756247892.9666651196.58%
micro-benchmarks/bm_pathname.rb10028.86605365629.000798768-0.47%
micro-benchmarks/bm_pi.rb10000.0318166700.0288376499.36%
micro-benchmarks/bm_pi.rb100002.7938742242.7282088132.35%
micro-benchmarks/bm_primes.rb30000.0008841000.0008343775.62%
micro-benchmarks/bm_primes.rb300000.0079500270.008346128-4.98%
micro-benchmarks/bm_primes.rb3000000.0770198550.078940931-2.49%
micro-benchmarks/bm_primes.rb30000000.7747306950.7652326571.23%
micro-benchmarks/bm_quicksort.rb10.9757187231.005529795-3.06%
micro-benchmarks/bm_read_large.rb1001.4458229041.4336912850.84%
micro-benchmarks/bm_regex_dna.rb201.6647405851.49271018010.33%
micro-benchmarks/bm_reverse_complement.rb12.2604946862.2190666741.83%
micro-benchmarks/bm_simple_connect.rb10.0001322510.00011614112.18%
micro-benchmarks/bm_simple_connect.rb1000.0033113020.0030900826.68%
micro-benchmarks/bm_simple_connect.rb5000.0163389400.0150205408.07%
micro-benchmarks/bm_simple_server.rb10.0001335030.000155542-16.51%
micro-benchmarks/bm_simple_server.rb1000.0009697070.00084697812.66%
micro-benchmarks/bm_simple_server.rb1000000.7293019840.6584448439.72%
micro-benchmarks/bm_so_ackermann.rb70.0405418650.0385931474.81%
micro-benchmarks/bm_so_ackermann.rb90.6496864580.6085772796.33%
micro-benchmarks/bm_so_array.rb90000.9828212220.9470421153.64%
micro-benchmarks/bm_so_count_words.rb1001.8701930481.7483349466.52%
micro-benchmarks/bm_so_exception.rb5000001.2383128231.1495423517.17%
micro-benchmarks/bm_so_lists.rb10002.1986860972.1147091633.82%
micro-benchmarks/bm_so_lists_small.rb10000.4533135950.4328647674.51%
micro-benchmarks/bm_so_matrix.rb600.3105549940.3086623030.61%
micro-benchmarks/bm_so_object.rb5000000.2440545830.254701496-4.36%
micro-benchmarks/bm_so_object.rb10000000.5101605330.523120809-2.54%
micro-benchmarks/bm_so_object.rb15000000.7860081950.787754481-0.22%
micro-benchmarks/bm_so_sieve.rb40004.9262801424.6936439554.72%
micro-benchmarks/bm_socket_transfer_1mb.rb100000.1383465710.07739996744.05%
micro-benchmarks/bm_socket_transfer_1mb.rb10000000.1382636570.07823478943.42%
micro-benchmarks/bm_socket_transfer_1mb_noblock.rb100000.1441793790.07864516845.45%
micro-benchmarks/bm_socket_transfer_1mb_noblock.rb10000000.1365246790.07641993144.02%
micro-benchmarks/bm_spectral_norm.rb1000.0875579860.0869018450.75%
micro-benchmarks/bm_string_concat.rb100000001.5728247591.39673948511.20%
micro-benchmarks/bm_sum_file.rb1002.4838524442.512043986-1.13%
micro-benchmarks/bm_word_anagrams.rb12.2992337622.2148209323.67%
micro-benchmarks/bm_write_large.rb1000.0947763400.0853874689.91%
rdoc/bm_rdoc_against_itself_darkfish.rb15.1562843784.49292330612.87%
rdoc/bm_rdoc_against_itself_ri.rb14.3977001244.0107925758.80%

So, as we could see, ruby-2.2.0 does bring new performance increase, especially in Socket and GCs.

No comments :

Post a Comment

THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?