class Object
Public Instance Methods
fast()
click to toggle source
1 object
# File lib/benchmark/cat.rb, line 19 def fast 'foo' 'bar' end
fast_interpolation()
click to toggle source
# File lib/benchmark/cat.rb, line 23 def fast_interpolation "#{'foo'}#{'bar'}" end
slow_append()
click to toggle source
2 + 1 = 3 object
# File lib/benchmark/cat.rb, line 14 def slow_append 'foo' << 'bar' end
slow_concat()
click to toggle source
2 + 1 = 3 object
# File lib/benchmark/cat.rb, line 9 def slow_concat 'foo'.concat 'bar' end
slow_plus()
click to toggle source
2 + 1 = 3 object
# File lib/benchmark/cat.rb, line 4 def slow_plus 'foo' + 'bar' end