Very simple speed benchmark of few string substitions ways
Stefan Behnel
stefan.behnel-n05pAM at web.de
Sun Jul 16 14:59:37 EDT 2006
Rafal Zawadzki wrote:
> I was curious of performance new Python 2.4 "Simpler String Substitutions"
> so I decided to benchmark it. What I get
>
> bluszcz at 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
More information about the Python-list
mailing list