- 06 1月, 2016 1 次提交
-
-
由 Santiago Pastorino 提交于
-
- 02 4月, 2015 2 次提交
-
-
由 brainopia 提交于
-
由 brainopia 提交于
https://github.com/ruby/ruby/pull/579 - there is a new optimization since ruby 2.2 Previously regexp patterns were faster (since a string was converted to regexp underneath anyway). But now string patterns are faster and better reflect the purpose. Benchmark.ips do |bm| bm.report('regexp') { 'this is ::a random string'.gsub(/::/, '/') } bm.report('string') { 'this is ::a random string'.gsub('::', '/') } bm.compare! end # string: 753724.4 i/s # regexp: 501443.1 i/s - 1.50x slower
-
- 02 11月, 2014 1 次提交
-
-
由 Pablo Herrero 提交于
-
- 20 6月, 2013 1 次提交
-
-
由 Piotr Sarnacki 提交于
-
- 18 5月, 2012 1 次提交
-
-
由 Steve Klabnik 提交于
Fixes #2394
-