Results of the benchmark on my MBP with Ruby v1.9.3-p545 looked like this:
$ ruby erb_benchmark.rb
Run options: --seed 1619
# Running tests:
Finished tests in 0.000771s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
# Running benchmarks:
ERB::using concatenated strings in one block 1 10 100 1000 10000
bench_to_render_host_and_port 0.000182 0.000032 0.000029 0.000028 0.000029
ERB::using multiple blocks 1 10 100 1000 10000
bench_to_render_host_and_port 0.000113 0.000034 0.000032 0.000031 0.000031
ERB::using one string in one block 1 10 100 1000 10000
bench_to_render_hoststring 0.000080 0.000027 0.000037 0.000024 0.000025
Finished benchmarks in 0.012297s, 243.9619 tests/s, 243.9619 assertions/s.
3 tests, 3 assertions, 0 failures, 0 errors, 0 skips
Another run:
$ ruby erb_benchmark.rb
Run options: --seed 34951
# Running tests:
Finished tests in 0.000787s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
# Running benchmarks:
ERB Benchmark::using concatenated strings in one block 1 10 100 1000 10000
bench_to_render_host_and_port 0.000147 0.000032 0.000030 0.000030 0.000030
ERB Benchmark::using multiple blocks 1 10 100 1000 10000
bench_to_render_host_and_port 0.000101 0.000034 0.000032 0.000042 0.000032
ERB Benchmark::using one string in one block 1 10 100 1000 10000
bench_to_render_hoststring 0.000086 0.000032 0.000027 0.000026 0.000026
Finished benchmarks in 0.012290s, 244.1009 tests/s, 244.1009 assertions/s.
3 tests, 3 assertions, 0 failures, 0 errors, 0 skips
And another run:
$ ruby erb_benchmark.rb
Run options: --seed 49169
# Running tests:
Finished tests in 0.000742s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
# Running benchmarks:
ERB Benchmark::using concatenated strings in one block 1 10 100 1000 10000
bench_to_render_host_and_port 0.000145 0.000034 0.000040 0.000030 0.000029
ERB Benchmark::using multiple blocks 1 10 100 1000 10000
bench_to_render_host_and_port 0.000104 0.000049 0.000043 0.000035 0.000034
ERB Benchmark::using one string in one block 1 10 100 1000 10000
bench_to_render_hoststring 0.000095 0.000030 0.000029 0.000026 0.000030
Finished benchmarks in 0.012543s, 239.1772 tests/s, 239.1772 assertions/s.
3 tests, 3 assertions, 0 failures, 0 errors, 0 skips