The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Better speed with VC++ 8

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Daniel Berger

Posts: 1383
Nickname: djberg96
Registered: Sep, 2004

Daniel Berger is a Ruby Programmer who also dabbles in C and Perl
Better speed with VC++ 8 Posted: Jan 25, 2007 11:11 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Daniel Berger.
Original Post: Better speed with VC++ 8
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Daniel Berger
Latest Posts From Testing 1,2,3...

Advertisement
I'm seeing about a 10-15% speedup on average by using the latest compiler. Draw your own conclusions:

# Ruby 1.8.5 / VC++ 6 (One Click)
                                         user     system      total        real
Array[]                              0.891000   0.010000   0.901000 (  1.011000)
Array.new(int)                       0.901000   0.010000   0.911000 (  0.941000)
Array.new(int, obj)                  1.012000   0.000000   1.012000 (  1.102000)
Array.new(array)                     1.001000   0.000000   1.001000 (  1.232000)
Array.new(size){ block }             1.302000   0.000000   1.302000 (  1.772000)
Array#&                              2.804000   0.040000   2.844000 (  3.135000)
Array#* (int)                        1.352000   0.060000   1.412000 (  1.652000)
Array#* (join)                       4.346000   0.120000   4.466000 (  4.827000)
Array#-                              2.955000   0.080000   3.035000 (  3.455000)
Array#<<                             0.350000   0.010000   0.360000 (  0.400000)
Array#<=>                            0.531000   0.000000   0.531000 (  0.591000)
Array#==                             0.641000   0.000000   0.641000 (  0.691000)
Array#[]                             0.200000   0.000000   0.200000 (  0.210000)
Array#[]=                            0.210000   0.000000   0.210000 (  0.231000)
Array#|                              2.985000   0.080000   3.065000 (  3.525000)
Array#assoc                          0.330000   0.000000   0.330000 (  0.350000)
Array#at                             0.200000   0.000000   0.200000 (  0.241000)
Array#clear                          0.181000   0.000000   0.181000 (  0.200000)
Array#collect                        1.181000   0.060000   1.241000 (  1.312000)
Array#collect!                       0.741000   0.000000   0.741000 (  0.791000)
Array#compact                        0.631000   0.030000   0.661000 (  0.771000)
Array#compact!                       0.201000   0.000000   0.201000 (  0.200000)
Array#concat                         2.183000   1.332000   3.515000 (  3.936000)
Array#delete(obj)                    0.721000   0.000000   0.721000 (  0.761000)
Array#delete(obj){ block }           1.101000   0.000000   1.101000 (  1.232000)
Array#delete_at                      0.201000   0.000000   0.201000 (  0.220000)
Array#delete_if                      0.951000   0.000000   0.951000 (  1.051000)
Array#each                           0.711000   0.000000   0.711000 (  0.752000)
Array#each_index                     0.841000   0.000000   0.841000 (  0.881000)
Array#empty?                         0.160000   0.000000   0.160000 (  0.180000)
Array#eql?                           0.381000   0.000000   0.381000 (  0.441000)
Array#fetch(index)                   0.190000   0.000000   0.190000 (  0.230000)
Array#fetch(index, default)          0.261000   0.000000   0.261000 (  0.280000)
Array#fetch(index){ block }          0.470000   0.000000   0.470000 (  0.491000)
Array#fill(obj)                      0.291000   0.000000   0.291000 (  0.321000)
Array#fill(obj, start)               0.340000   0.000000   0.340000 (  0.390000)
Array#fill(obj, start, length)       0.271000   0.000000   0.271000 (  0.301000)
Array#fill(obj, range)               0.450000   0.000000   0.450000 (  0.500000)
Array#fill{ block }                  0.761000   0.000000   0.761000 (  0.811000)
Array#fill(start){ block }           0.691000   0.000000   0.691000 (  0.761000)
Array#fill(start, length){ block }   0.451000   0.000000   0.451000 (  0.491000)
Array#fill(range){ block }           0.661000   0.000000   0.661000 (  0.731000)
Array#first                          0.170000   0.000000   0.170000 (  0.191000)
Array#flatten                        3.195000   0.050000   3.245000 (  3.605000)
Array#flatten!                       1.602000   0.000000   1.602000 (  1.702000)
Array#include?                       1.032000   0.000000   1.032000 (  1.102000)
Array#index                          1.472000   0.000000   1.472000 (  1.632000)
Array#insert                       303.947000   0.711000 304.658000 (344.549000)
Array#join                           4.076000   0.081000   4.157000 (  4.516000)
Array#last                           0.180000   0.000000   0.180000 (  0.190000)
Array#length                         0.150000   0.000000   0.150000 (  0.181000)
Array#nitems                         0.180000   0.000000   0.180000 (  0.180000)
Array#pack                           0.822000   0.020000   0.842000 (  0.951000)
Array#pop                            0.170000   0.000000   0.170000 (  0.170000)
Array#push                           0.911000   0.030000   0.941000 (  1.022000)
Array#rassoc                         0.401000   0.000000   0.401000 (  0.420000)
Array#reject                         1.111000   0.000000   1.111000 (  1.172000)
Array#reject!                        0.621000   0.000000   0.621000 (  0.741000)
Array#replace                        1.452000   0.000000   1.452000 (  1.522000)
Array#reverse                        0.451000   0.000000   0.451000 (  0.491000)
Array#reverse!                       0.190000   0.000000   0.190000 (  0.200000)
Array#reverse_each                   0.651000   0.000000   0.651000 (  0.731000)
Array#rindex                         0.210000   0.000000   0.210000 (  0.231000)
Array#shift                          0.171000   0.000000   0.171000 (  0.170000)
Array#slice(int)                     0.210000   0.000000   0.210000 (  0.210000)
Array#slice(start, length)           0.240000   0.000000   0.240000 (  0.261000)
Array#slice(range)                   0.331000   0.000000   0.331000 (  0.350000)
Array#slice!(int)!                   0.200000   0.000000   0.200000 (  0.220000)
Array#slice!(start, length)          1.022000   0.010000   1.032000 (  1.102000)
Array#slice!(range)                  0.580000   0.020000   0.600000 (  0.661000)
Array#sort                           0.711000   0.000000   0.711000 (  0.791000)
Array#sort{ block }                  5.008000   0.040000   5.048000 (  6.359000)
Array#sort!                          0.230000   0.000000   0.230000 (  0.260000)
Array#sort!{ block }                 3.165000   0.040000   3.205000 (  3.425000)
Array#to_a                           0.180000   0.000000   0.180000 (  0.191000)
Array#to_ary                         0.160000   0.000000   0.160000 (  0.180000)
Array#to_s                           3.956000   0.090000   4.046000 (  4.536000)
Array#transpose                      1.892000   0.040000   1.932000 (  2.073000)
Array#uniq                           2.304000   0.040000   2.344000 (  2.604000)
Array#uniq!                          1.602000   0.070000   1.672000 (  1.823000)
Array#unshift                        0.170000   0.000000   0.170000 (  0.200000)
Array#values_at(int)                 0.461000   0.010000   0.471000 (  0.511000)
Array#values_at(range)               2.484000   0.030000   2.514000 (  2.763000)

# Ruby 1.8.5p12 / VC++ 8
                                         user     system      total        real
Array[]                              0.771000   0.000000   0.771000 (  0.822000)
Array.new(int)                       0.751000   0.000000   0.751000 (  0.791000)
Array.new(int, obj)                  0.791000   0.000000   0.791000 (  0.851000)
Array.new(array)                     0.891000   0.010000   0.901000 (  0.961000)
Array.new(size){ block }             1.052000   0.000000   1.052000 (  1.192000)
Array#&                              2.233000   0.040000   2.273000 (  2.604000)
Array#* (int)                        0.951000   0.030000   0.981000 (  1.071000)
Array#* (join)                       2.654000   0.050000   2.704000 (  3.095000)
Array#-                              2.474000   0.120000   2.594000 (  2.974000)
Array#<<                             0.310000   0.000000   0.310000 (  0.390000)
Array#<=>                            0.471000   0.000000   0.471000 (  0.501000)
Array#==                             0.561000   0.000000   0.561000 (  0.601000)
Array#[]                             0.180000   0.000000   0.180000 (  0.210000)
Array#[]=                            0.230000   0.000000   0.230000 (  0.231000)
Array#|                              2.323000   0.070000   2.393000 (  2.713000)
Array#assoc                          0.391000   0.000000   0.391000 (  0.401000)
Array#at                             0.200000   0.000000   0.200000 (  0.210000)
Array#clear                          0.181000   0.000000   0.181000 (  0.191000)
Array#collect                        1.021000   0.000000   1.021000 (  1.091000)
Array#collect!                       0.621000   0.000000   0.621000 (  0.681000)
Array#compact                        0.641000   0.000000   0.641000 (  0.691000)
Array#compact!                       0.190000   0.000000   0.190000 (  0.190000)
Array#concat                         2.113000   1.362000   3.475000 (  3.876000)
Array#delete(obj)                    0.611000   0.000000   0.611000 (  0.661000)
Array#delete(obj){ block }           0.631000   0.000000   0.631000 (  0.911000)
Array#delete_at                      0.190000   0.000000   0.190000 (  0.240000)
Array#delete_if                      1.022000   0.000000   1.022000 (  1.232000)
Array#each                           0.661000   0.000000   0.661000 (  0.661000)
Array#each_index                     0.721000   0.000000   0.721000 (  1.232000)
Array#empty?                         0.150000   0.000000   0.150000 (  0.190000)
Array#eql?                           0.290000   0.000000   0.290000 (  0.371000)
Array#fetch(index)                   0.201000   0.000000   0.201000 (  0.250000)
Array#fetch(index, default)          0.280000   0.000000   0.280000 (  0.331000)
Array#fetch(index){ block }          0.331000   0.000000   0.331000 (  0.410000)
Array#fill(obj)                      0.270000   0.000000   0.270000 (  0.421000)
Array#fill(obj, start)               0.280000   0.000000   0.280000 (  0.320000)
Array#fill(obj, start, length)       0.321000   0.000000   0.321000 (  0.351000)
Array#fill(obj, range)               0.330000   0.000000   0.330000 (  0.410000)
Array#fill{ block }                  0.711000   0.000000   0.711000 (  0.992000)
Array#fill(start){ block }           0.621000   0.000000   0.621000 (  0.661000)
Array#fill(start, length){ block }   0.391000   0.000000   0.391000 (  0.460000)
Array#fill(range){ block }           0.581000   0.000000   0.581000 (  0.902000)
Array#first                          0.200000   0.000000   0.200000 (  0.250000)
Array#flatten                        2.874000   0.010000   2.884000 (  5.348000)
Array#flatten!                       1.222000   0.000000   1.222000 (  1.321000)
Array#include?                       0.741000   0.000000   0.741000 (  0.902000)
Array#index                          1.262000   0.000000   1.262000 (  1.422000)
Array#insert                       291.589000   0.831000 292.420000 (350.266000)
Array#join                           3.054000   0.080000   3.134000 (  4.256000)
Array#last                           0.181000   0.000000   0.181000 (  0.191000)
Array#length                         0.170000   0.000000   0.170000 (  0.180000)
Array#nitems                         0.160000   0.000000   0.160000 (  0.190000)
Array#pack                           1.152000   0.050000   1.202000 (  1.292000)
Array#pop                            0.190000   0.000000   0.190000 (  0.190000)
Array#push                           0.501000   0.030000   0.531000 (  0.581000)
Array#rassoc                         0.310000   0.000000   0.310000 (  0.341000)
Array#reject                         1.082000   0.020000   1.102000 (  1.251000)
Array#reject!                        0.490000   0.000000   0.490000 (  1.032000)
Array#replace                        0.681000   0.000000   0.681000 (  0.761000)
Array#reverse                        0.401000   0.000000   0.401000 (  0.461000)
Array#reverse!                       0.170000   0.000000   0.170000 (  0.200000)
Array#reverse_each                   0.541000   0.000000   0.541000 (  0.591000)
Array#rindex                         0.200000   0.000000   0.200000 (  0.210000)
Array#shift                          0.171000   0.000000   0.171000 (  0.190000)
Array#slice(int)                     0.200000   0.000000   0.200000 (  0.211000)
Array#slice(start, length)           0.671000   0.000000   0.671000 (  0.731000)
Array#slice(range)                   0.280000   0.000000   0.280000 (  0.300000)
Array#slice!(int)!                   0.231000   0.000000   0.231000 (  0.250000)
Array#slice!(start, length)          0.480000   0.000000   0.480000 (  0.511000)
Array#slice!(range)                  0.801000   0.010000   0.811000 (  0.851000)
Array#sort                           0.411000   0.030000   0.441000 (  0.531000)
Array#sort{ block }                  4.276000   0.061000   4.337000 (  4.987000)
Array#sort!                          0.220000   0.000000   0.220000 (  0.251000)
Array#sort!{ block }                 2.504000   0.050000   2.554000 (  2.854000)
Array#to_a                           0.190000   0.000000   0.190000 (  0.190000)
Array#to_ary                         0.171000   0.000000   0.171000 (  0.180000)
Array#to_s                           3.284000   0.120000   3.404000 (  4.497000)
Array#transpose                      1.753000   0.070000   1.823000 (  2.313000)
Array#uniq                           2.423000   0.030000   2.453000 (  2.724000)
Array#uniq!                          2.213000   0.070000   2.283000 (  2.503000)
Array#unshift                        0.171000   0.000000   0.171000 (  0.190000)
Array#values_at(int)                 0.691000   0.000000   0.691000 (  0.792000)
Array#values_at(range)               1.001000   0.040000   1.041000 (  1.091000)

Read: Better speed with VC++ 8

Topic: Subversion graphs on RubyForge Previous Topic   Next Topic Topic: Ruby In Steel Manual Now Available

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use