Skip to content

Instantly share code, notes, and snippets.

@DamirSvrtan
Last active August 29, 2015 14:00
Show Gist options
  • Save DamirSvrtan/11330565 to your computer and use it in GitHub Desktop.
Save DamirSvrtan/11330565 to your computer and use it in GitHub Desktop.
Returning an array as a response:
[200, {'Content-Type' => 'text/html'}, ["<h1>Hello!</h1>"]]
Benchmark:
10000 runs
0.037738 seconds total
0.0037738 millisec/run
With a controller rendering a template with erb:
Benchmark:
10000 runs
2.366915 seconds total
0.2366915 millisec/run
With a controller rendering a plain html file:
Benchmark:
10000 runs
0.606326 seconds total
0.0606326 millisec/run
With a controller return a simple text:
'<h1>Simple Text</h1>'
Benchmark:
10000 runs
0.094172 seconds total
0.0094172 millisec/run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment