Very simple speed benchmark of few string substitions ways

R

Rafal Zawadzki

I was curious of performance new Python 2.4 "Simpler String Substitutions"
so I decided to benchmark it. What I get

bluszcz@akira:~/python/benchmarks$ python template.py
Normal python string substition = 0.017546 seconds
PEP 292: Simpler String Substitutions = 0.243750 seconds
Jinja template system = 0.821844 seconds
Cheetah template system = 26.842872 seconds
bluszcz@akira:~/python/benchmarks$

To get i wrote small soft:
http://wiki.bluszcz.net/PythoneTemplatingSystemsSpeedBenchmark

Cheers,
 
S

Stefan Behnel

Rafal said:
I was curious of performance new Python 2.4 "Simpler String Substitutions"
so I decided to benchmark it. What I get

bluszcz@akira:~/python/benchmarks$ python template.py
Normal python string substition = 0.017546 seconds
PEP 292: Simpler String Substitutions = 0.243750 seconds
Jinja template system = 0.821844 seconds
Cheetah template system = 26.842872 seconds

That's interesting. You know what? I compared my swiss knife and my spoon
recently and found that my swiss knife is slower in handling as it requires
additional opening. So I decided to stop using it. I just don't get why they
keep producing these things.

Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top