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. Also now that I think about it with debug mode on I call some methods 2 or 3 more times for each run of loop. This is done to display the debuging data. In t % cumulative self self total time seconds seconds calls ms/call ms/call name -------------one_liner? Before static regx 4.69 0.46 0.03 271 0.11 0.15 Object#one_liner? After 2.99 0.61 0.02 271 0.07 0.07 Object#one_liner? ---------------just_the_string_please before 8.96 0.40 0.06 332 0.18 0.21 Object#just_the_string_please With hash of regx 9.23 0.38 0.06 332 0.18 0.30 Object#just_the_string_please as constant regx 10.17 0.38 0.06 332 0.18 0.24 Object#just_the_string_please as one regx instead of 4 7.27 0.31 0.04 332 0.12 0.15 Object#just_the_string_please as one as a constant 6.90 0.34 0.04 332 0.12 0.15 Object#just_the_string_please called in one location not 2 1.92 0.90 0.02 233 0.09 0.21 Object#just_the_string_please ---------Check_ends? before 6.78 0.44 0.04 183 0.22 0.55 Object#check_ends? constant regx 10.34 0.29 0.06 183 0.33 0.60 Object#check_ends? match instead of slice 1.67 0.60 0.01 183 0.05 0.16 Object#check_ends? constant regx 0.00 0.60 0.00 183 0.00 0.16 Object#check_ends? ---------in_both? 3.57 0.42 0.02 324 0.06 0.52 Object#in_both? no loop one regx with $1 ref 3.85 0.45 0.02 330 0.06 0.12 Object#in_both? regx as constant 1.92 0.52 0.01 330 0.03 0.03 Object#in_both? ------in_outs 1.96 0.46 0.01 186 0.05 1.40 Object#in_outs? one regx no loop 0.00 0.38 0.00 186 0.00 0.11 Object#in_outs? regx constant 0.00 0.38 0.00 186 0.00 0.05 Object#in_outs? -----start_block after some mucking 8.26 0.60 0.10 639 0.16 0.45 Object#start_block? did a match instead of a include? 6.50 0.79 0.08 639 0.13 0.56 Object#start_block? the match regx is a constant 5.22 0.86 0.06 642 0.09 0.40 Object#start_block? -----line clean up contstant regx 0.00 0.35 0.00 62 0.00 0.16 Object#line_clean_up