Skip to content

Instantly share code, notes, and snippets.

@kwleland
Created December 13, 2013 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwleland/7946415 to your computer and use it in GitHub Desktop.
Save kwleland/7946415 to your computer and use it in GitHub Desktop.
profile of bm_word_anagrams.rb
Thread 1: total running time: 191.491809676s
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
8.36 23.56 16.02 4150098 0.00 0.01 String#[]
7.43 27.81 14.24 2903040 0.00 0.01 String#replace
7.32 35.12 14.03 1247058 0.01 0.03 String#[]=
6.25 63.45 11.97 2903040 0.00 0.02 String#+
5.84 26.53 11.19 884179 0.01 0.03 Array::recursively_flatten<1796> {}
5.31 92.74 10.16 2903040 0.00 0.03 String::permutations<42> {}
4.32 9.57 8.27 2903040 0.00 0.00 Array#[]
4.18 16.00 8.01 4150098 0.00 0.00 String#force_encoding
3.92 9.52 7.50 1247058 0.01 0.01 Rubinius::Mirror::String#splice
3.30 99.53 6.32 623529 0.01 0.16 Array#each_index
3.30 8.57 6.32 2903040 0.00 0.00 String.allocate
2.67 7.18 5.11 2903040 0.00 0.00 String#<<
2.37 28.48 4.55 884179 0.01 0.03 Thread.detect_recursion
2.23 189.40 4.28 623529 0.01 0.30 String::permutations<39> {}
2.23 5.07 4.27 6020685 0.00 0.00 Module#===
2.23 32.33 4.27 2903040 0.00 0.01 String#initialize
2.15 7.62 4.11 4150098 0.00 0.00 Rubinius::Type.coerce_to_encoding
1.91 6.02 3.65 2903040 0.00 0.00 Rubinius::Type.check_convert_type
1.89 4.37 3.61 4150098 0.00 0.00 Rubinius::Type.compatible_encoding
1.28 29.29 2.46 884179 0.00 0.03 Array#recursively_flatten
1.21 39.50 2.32 623529 0.00 0.06 String#swap
1.20 2.43 2.30 4150098 0.00 0.00 String#substring
1.18 2.99 2.26 3526569 0.00 0.00 Array#<<
1.08 3.38 2.06 1247058 0.00 0.00 Rubinius::Mirror.reflect
1.01 2.04 1.94 2903040 0.00 0.00 Rubinius::Type.object_respond_to?
1.01 1.93 1.93 2255 0.85 0.85 GC.collect_young
0.82 1.80 1.57 7053138 0.00 0.00 String#num_bytes=
0.81 191.49 1.56 623530 0.00 0.31 String#permutations
0.78 1.75 1.50 7053138 0.00 0.00 Kernel#StringValue
0.74 2.04 1.42 17959828 0.00 0.00 Fixnum#<
0.74 1.52 1.42 2903040 0.00 0.00 String#append
0.73 189.40 1.40 260650 0.01 0.73 Integer#times
0.71 1.94 1.37 17075649 0.00 0.00 Fixnum#+
0.55 1.39 1.05 10170783 0.00 0.00 Rubinius::Type.object_kind_of?
0.52 1.36 0.99 11203239 0.00 0.00 Kernel#kind_of?
0.51 1.10 0.98 623529 0.00 0.00 Range#initialize
0.44 1.21 0.84 10431434 0.00 0.00 Kernel#equal?
0.44 30.23 0.84 260650 0.00 0.12 Array#flatten
0.42 0.96 0.80 1247058 0.00 0.00 Rubinius::Type.coerce_to
0.39 0.94 0.75 5872413 0.00 0.00 String#size
0.39 0.82 0.74 2494116 0.00 0.00 Rubinius::Mirror::String#byte_index
0.36 0.96 0.69 7313788 0.00 0.00 Rubinius::Type.infect
0.36 0.94 0.68 7789052 0.00 0.00 Fixnum#==
0.34 0.76 0.66 884179 0.00 0.00 Kernel#===
0.32 0.76 0.62 4150098 0.00 0.00 Encoding.compatible?
27 methods omitted
72 methods called a total of 237,773,749 times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment