Sha256: f90d751b5505187de5bd5ecd568ddf3093478bb5101bca30624d72d33e830f92

Contents?: true

Size: 442 Bytes

Versions: 17

Compression:

Stored size: 442 Bytes

Contents

require 'rubygems'
require 'tach'

key = 'Content-Length'
value = '100'
Tach.meter(1_000) do
  tach('concat') do
    temp = ''
    temp << key << ': ' << value << "\r\n"
  end
  tach('interpolate') do
    "#{key}: #{value}\r\n"
  end
end

# +-------------+----------+
# | tach        | total    |
# +-------------+----------+
# | interpolate | 0.000404 |
# +-------------+----------+
# | concat      | 0.000564 |
# +-------------+----------+

Version data entries

17 entries across 15 versions & 2 rubygems

Version Path
excon-0.64.0 benchmarks/concat_vs_interpolate.rb
excon-0.63.0 benchmarks/concat_vs_interpolate.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/excon-0.62.0/benchmarks/concat_vs_interpolate.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/excon-0.62.0/benchmarks/concat_vs_interpolate.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/excon-0.62.0/benchmarks/concat_vs_interpolate.rb
excon-0.62.0 benchmarks/concat_vs_interpolate.rb
excon-0.61.0 benchmarks/concat_vs_interpolate.rb
excon-0.60.0 benchmarks/concat_vs_interpolate.rb
excon-0.59.0 benchmarks/concat_vs_interpolate.rb
excon-0.58.0 benchmarks/concat_vs_interpolate.rb
excon-0.57.1 benchmarks/concat_vs_interpolate.rb
excon-0.57.0 benchmarks/concat_vs_interpolate.rb
excon-0.56.0 benchmarks/concat_vs_interpolate.rb
excon-0.55.0 benchmarks/concat_vs_interpolate.rb
excon-0.54.0 benchmarks/concat_vs_interpolate.rb
excon-0.53.0 benchmarks/concat_vs_interpolate.rb
excon-0.52.0 benchmarks/concat_vs_interpolate.rb