Add a benchmarking script for string-concat

This commit is contained in:
Parker Moore 2014-10-22 00:56:54 -07:00
parent c92ad3b595
commit 95e96a0f83
1 changed files with 8 additions and 0 deletions

8
benchmark/string-concat Normal file
View File

@ -0,0 +1,8 @@
require 'benchmark/ips'
url = "http://jekyllrb.com"
Benchmark.ips do |x|
x.report('+=') { url += '/' }
x.report('<<') { url << '/' }
end