Just wanted to make a note, string interpolation is faster than printf in Ruby. Example:
$ irb >> require 'benchmark' => true >> Benchmark.measure { 100000.times { "%s" % ["hello world"] } }.total => 0.21 >> Benchmark.measure { 100000.times { "#{'hello world'}"} }.total => 0.04
No Comments, Comment or Ping
Reply to “String interpolation is faster than printf in Ruby”