Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
a6a326e5
Commit
a6a326e5
authored
Jul 24, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add django_tiny microbenchmark
parent
0afbff14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
microbenchmarks/django_tiny.py
microbenchmarks/django_tiny.py
+28
-0
No files found.
microbenchmarks/django_tiny.py
0 → 100644
View file @
a6a326e5
import
os
import
sys
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../test/integration/django"
))
from
django.conf
import
settings
settings
.
configure
()
from
django.template
import
Context
,
Template
,
Node
import
time
DJANGO_TMPL
=
Template
(
"""
{{ col|escape }}
"""
.
strip
())
def
test_django
():
table
=
[
xrange
(
50
)
for
_
in
xrange
(
50
)]
context
=
Context
({
"table"
:
table
,
'col'
:
1
})
times
=
[]
node
=
DJANGO_TMPL
.
nodelist
[
0
]
context
.
push
()
for
_
in
xrange
(
100000
):
node
.
render
(
context
)
context
.
pop
()
return
times
test_django
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment