Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save KJTsanaktsidis/518b714b11b2adee165623af36b0e886 to your computer and use it in GitHub Desktop.
Save KJTsanaktsidis/518b714b11b2adee165623af36b0e886 to your computer and use it in GitHub Desktop.
Effects of memoizing marking
With memocache:
kj@kj-thinkpad ruby_memprofiler_pprof % ruby script/benchmark.rb
user system total real
no profiling (1) 15.844936 0.469273 16.314209 ( 16.337021)
no profiling (2) 14.966771 0.034934 15.001705 ( 15.020942)
with profiling (1%, no flush) 15.971306 0.477258 16.448564 ( 16.471195)
with reporting (1%, with flush) 17.402173 0.029948 17.432121 ( 17.454925)
with profiling (10%, no flush) 23.168302 0.289576 23.457878 ( 23.487329)
with reporting (10%, with flush) 48.194583 0.042943 48.237526 ( 48.290087)
with profiling (100%, no flush) 24.493680 0.329478 24.823158 ( 24.856144)
with reporting (100%, with flush) 95.083065 0.099887 95.182952 ( 95.286911)
without memocache
kj@kj-thinkpad ruby_memprofiler_pprof % ruby script/benchmark.rb
user system total real
no profiling (1) 16.065417 0.485242 16.550659 ( 16.573165)
no profiling (2) 15.000798 0.023953 15.024751 ( 15.043646)
with profiling (1%, no flush) 22.747568 0.536194 23.283762 ( 23.311101)
with reporting (1%, with flush) 24.246680 0.033966 24.280646 ( 24.308290)
with profiling (10%, no flush) 107.980856 0.293503 108.274359 (108.367820)
with reporting (10%, with flush) 155.435044 0.051858 155.486902 (155.656765)
with profiling (100%, no flush) 625.515556 0.349395 625.864951 (626.395230)
with reporting (100%, with flush) 1081.306918 0.127849 1081.434767 (1082.340924)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment