using require "profile" I found these results from changing code. Do not read in to it to much I seem to get differnt results on the same formatted text. The text I used was the test_file.rb and was not preformatted to favor any code. test_file.rb svn rev 54 Base profile % cumulative self self total time seconds seconds calls ms/call ms/call name 28.95 0.11 0.11 2 55.00 380.00 Array#each 10.53 0.15 0.04 1029 0.04 0.04 String#scan 7.89 0.18 0.03 1320 0.02 0.04 String#match 7.89 0.21 0.03 184 0.16 0.16 Object#just_the_string_please 5.26 0.23 0.02 1190 0.02 0.02 String#lstrip 5.26 0.25 0.02 144 0.14 0.28 Object#start_block? 5.26 0.27 0.02 1320 0.02 0.02 Regexp#match 5.26 0.29 0.02 309 0.06 0.10 Object#in_both? 5.26 0.31 0.02 181 0.11 0.39 Object#check_ends? 2.63 0.32 0.01 650 0.02 0.02 Array#size 2.63 0.33 0.01 174 0.06 0.06 String#* 2.63 0.34 0.01 181 0.06 0.11 Object#in_outs? 2.63 0.35 0.01 574 0.02 0.02 String#<< 2.63 0.36 0.01 184 0.05 0.05 String#strip! 2.63 0.37 0.01 184 0.05 0.11 Object#line_clean_up 2.63 0.38 0.01 512 0.02 0.08 Object#one_liner? 0.00 0.38 0.00 2 0.00 0.00 Array#last 0.00 0.38 0.00 2 0.00 0.00 IO#close 0.00 0.38 0.00 152 0.00 0.00 Fixnum#== 0.00 0.38 0.00 199 0.00 0.00 String#split 0.00 0.38 0.00 2 0.00 0.00 File#initialize 0.00 0.38 0.00 1 0.00 0.00 IO#read 0.00 0.38 0.00 48 0.00 0.00 Fixnum#- 0.00 0.38 0.00 184 0.00 0.00 String#rstrip 0.00 0.38 0.00 7 0.00 0.00 String#== 0.00 0.38 0.00 244 0.00 0.00 Fixnum#+ 0.00 0.38 0.00 184 0.00 0.00 String#gsub! 0.00 0.38 0.00 128 0.00 0.00 String#strip 0.00 0.38 0.00 1 0.00 0.00 IO#puts 0.00 0.38 0.00 368 0.00 0.00 String#gsub 0.00 0.38 0.00 7 0.00 0.00 Module#method_added 0.00 0.38 0.00 182 0.00 0.00 Fixnum#< 0.00 0.38 0.00 135 0.00 0.00 String#slice 0.00 0.38 0.00 328 0.00 0.00 Fixnum#> 0.00 0.38 0.00 296 0.00 0.00 String#size 0.00 0.38 0.00 184 0.00 0.00 Array#first 0.00 0.38 0.00 2 0.00 0.00 IO#open 0.00 0.38 0.00 3 0.00 0.00 IO#write 0.00 0.38 0.00 12 0.00 0.00 Array#join 0.00 0.38 0.00 1 0.00 0.00 Kernel.puts 0.00 0.38 0.00 379 0.00 0.00 Array#empty? 0.00 0.38 0.00 1 0.00 0.00 Array#length 0.00 0.38 0.00 1 0.00 380.00 #toplevel --------in both? base 5.26 0.29 0.02 309 0.06 0.10 Object#in_both? Called only once per loop 0.00 0.33 0.00 184 0.00 0.11 Object#in_both? --------one_liner base 2.63 0.38 0.01 512 0.02 0.08 Object#one_liner? called only once 3.13 0.30 0.01 184 0.05 0.11 Object#one_liner? -------just the string please base 7.89 0.21 0.03 184 0.16 0.16 Object#just_the_string_please now with !s 2.94 0.31 0.01 184 0.05 0.27 Object#just_the_string_please with correct pre gsub 6.06 0.22 0.02 184 0.11 0.22 Object#just_the_string_please just one strip not two 3.03 0.32 0.01 184 0.05 0.11 Object#just_the_string_please pre gsub as a constant <-reverted 21.88 0.17 0.07 184 0.38 0.38 Object#just_the_string_please --------start block base 5.26 0.25 0.02 144 0.14 0.28 Object#start_block? with regx for { and } 9.37 0.17 0.03 144 0.21 0.21 Object#start_block? -------check_ends base 5.26 0.31 0.02 181 0.11 0.39 Object#check_ends? with regx 8.82 0.23 0.03 181 0.17 0.22 Object#check_ends? ---- in outs base 2.63 0.34 0.01 181 0.06 0.11 Object#in_outs? Changed to a post if 0.00 0.32 0.00 184 0.00 0.05 Object#in_outs?