From 95e96a0f839c8f64840c4c31c3255862351ce927 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 22 Oct 2014 00:56:54 -0700 Subject: [PATCH] Add a benchmarking script for string-concat --- benchmark/string-concat | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 benchmark/string-concat diff --git a/benchmark/string-concat b/benchmark/string-concat new file mode 100644 index 00000000..c4a91748 --- /dev/null +++ b/benchmark/string-concat @@ -0,0 +1,8 @@ +require 'benchmark/ips' + +url = "http://jekyllrb.com" + +Benchmark.ips do |x| + x.report('+=') { url += '/' } + x.report('<<') { url << '/' } +end