1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport
Rafael Mendonça França ed738f75d2 Revert "Merge pull request #10600 from aditya-kapoor/code_refactor"
This reverts commit 8ce3c1e5dd, reversing
changes made to f93da579ce.

Reason: It slow down the running time.

require "diffbench"
load 'output_safety.rb'

N = 10000
b = ActiveSupport::SafeBuffer.new("hello world")
DiffBench.bm do
  report "capitalize in safe buffer" do
    N.times do
      b.capitalize
    end
  end
end

> git checkout  069ea45; diffbench bench.rb;
diffbench bench.rb;diffbench
bench.rb;diffbench bench.rb;diffbench
bench.rb;diffbench bench.rb;diffbench
bench.rb;

Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

                    user     system      total
                    real
----------------------------------capitalize
in safe buffer
After patch:    0.010000   0.000000   0.010000
(  0.009733)
Before patch:   0.010000   0.000000   0.010000
(  0.007702)
Improvement: -26%

Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

                    user     system      total
                    real
----------------------------------capitalize
in safe buffer
After patch:    0.010000   0.000000   0.010000
(  0.009768)
Before patch:   0.010000   0.000000   0.010000
(  0.007896)
Improvement: -24%

Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

                    user     system      total
                    real
----------------------------------capitalize
in safe buffer
After patch:    0.010000   0.000000   0.010000
(  0.009938)
Before patch:   0.010000   0.000000   0.010000
(  0.007768)
Improvement: -28%

Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

                    user     system      total
                    real
----------------------------------capitalize
in safe buffer
After patch:    0.010000   0.000000   0.010000
(  0.010001)
Before patch:   0.010000   0.000000   0.010000
(  0.007873)
Improvement: -27%

Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

                    user     system      total
                    real
----------------------------------capitalize
in safe buffer
After patch:    0.010000   0.000000   0.010000
(  0.009670)
Before patch:   0.010000   0.000000   0.010000
(  0.007800)
Improvement: -24%

Running benchmark with current working tree
Checkout HEAD^
Running benchmark with HEAD^
Checkout to previous HEAD again

                    user     system      total
                    real
----------------------------------capitalize
in safe buffer
After patch:    0.010000   0.000000   0.010000
(  0.009949)
Before patch:   0.010000   0.000000   0.010000
(  0.007752)
Improvement: -28%
2013-05-15 14:00:58 -03:00
..
bin
lib Revert "Merge pull request #10600 from aditya-kapoor/code_refactor" 2013-05-15 14:00:58 -03:00
test remove deprecation notices 2013-05-15 09:40:58 -07:00
activesupport.gemspec Replace multi_json with json 2013-05-11 21:43:48 -07:00
CHANGELOG.md Fix typo: require -> requires 2013-05-12 15:16:32 -03:00
MIT-LICENSE
Rakefile
README.rdoc

= Active Support -- Utility classes and Ruby extensions from Rails

Active Support is a collection of utility classes and standard library
extensions that were found useful for the Rails framework. These additions
reside in this package so they can be loaded as needed in Ruby projects
outside of Rails.


== Download and installation

The latest version of Active Support can be installed with RubyGems:

  % [sudo] gem install activesupport

Source code can be downloaded as part of the Rails project on GitHub:

* https://github.com/rails/rails/tree/master/activesupport


== License

Active Support is released under the MIT license:

* http://www.opensource.org/licenses/MIT


== Support

API documentation is at:

* http://api.rubyonrails.org

Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here:

* https://github.com/rails/rails/issues