repo.or.cz
/
ruby.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git]
/
benchmark
/
app_erb.yml
blob
31e29b764442e5974cdbbccec312b450be3e1086
1
#
2
# Create many HTML strings with ERB.
3
#
4
prelude: |
5
require 'erb'
6
7
data = <<erb
8
<html>
9
<head> <%= title %> </head>
10
<body>
11
<h1> <%= title %> </h1>
12
<p>
13
<%= content %>
14
</p>
15
</body>
16
</html>
17
erb
18
19
title = "hello world!"
20
content = "hello world!\n" * 10
21
benchmark:
22
app_erb: ERB.new(data).result(binding)
23
loop_count: 15000