Skip to content

Instantly share code, notes, and snippets.

@luke-gru
Last active August 29, 2015 14:03
Show Gist options
  • Save luke-gru/97ffab072df535a056a8 to your computer and use it in GitHub Desktop.
Save luke-gru/97ffab072df535a056a8 to your computer and use it in GitHub Desktop.
ruby 1.9.3 ERB rendering benchmark without change + rubyprof top 10 highest self time methods
(1.9.3)luke@luke-K52F:~/Desktop/code/rails/actionview$ ruby -Itest test/template/benchmark/render_erb_test.rb
Run options: --seed 48936
# Running:
Calculating -------------------------------------
small erb template 136 i/100ms
-------------------------------------------------
small erb template 1479.1 (±8.1%) i/s - 7344 in 5.007999s
.Calculating -------------------------------------
small erb template with 1 partial
86 i/100ms
-------------------------------------------------
small erb template with 1 partial
908.1 (±8.5%) i/s - 4558 in 5.066902s
.Calculating -------------------------------------
small erb template with 2 partials
63 i/100ms
-------------------------------------------------
small erb template with 2 partials
659.5 (±7.9%) i/s - 3276 in 5.007302s
.
Finished in 21.344005s, 0.1406 runs/s, 0.1406 assertions/s.
3 runs, 3 assertions, 0 failures, 0 errors, 0 skips
Thread ID: 15134720
Total: 21.330347
Sort by: self_time
%self total self wait child calls name
5.08 1.65 1.08 0.00 0.56 460460 Set#add
4.12 2.59 0.88 0.00 1.71 347847 ThreadSafe::Cache#[]
3.19 1.70 0.68 0.00 1.02 347847 ThreadSafe::NonConcurrentCacheBackend#[]
3.07 0.65 0.65 0.00 0.00 517896 Hash#[]=
1.97 0.42 0.42 0.00 0.00 460480 Symbol#==
1.69 1.00 0.36 0.00 0.64 36323 ActionView::LookupContext::ViewPaths#normalize_name
1.58 0.46 0.34 0.00 0.12 120047 Array#hash
1.43 9.86 0.31 0.00 9.55 36323 *ActiveSupport::Notifications::Instrumenter#instrument
1.37 0.92 0.29 0.00 0.63 145298 ActiveSupport::Notifications::Fanout#listeners_for
1.25 7.34 0.27 0.00 7.07 20928 ActionView::TemplateRenderer#determine_template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment