Very simple speed benchmark of few string substitions ways

Discussion in 'Python' started by Rafal Zawadzki, Jul 16, 2006.

  1. 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,

    --
    RafaÅ‚ ã¤ãŸ Zawadzki
    http://bluszcz.net http://wiki.bluszcz.net
     
    Rafal Zawadzki, Jul 16, 2006
    #1
    1. Advertising

  2. 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@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
     
    Stefan Behnel, Jul 16, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bowen Chiu
    Replies:
    1
    Views:
    554
    Skip Montanaro
    Aug 9, 2003
  2. Replies:
    1
    Views:
    902
    Andrew Dalke
    Jan 12, 2004
  3. olivier.melcher

    Help running a very very very simple code

    olivier.melcher, May 12, 2008, in forum: Java
    Replies:
    8
    Views:
    2,331
  4. dede
    Replies:
    6
    Views:
    146
    A. Sinan Unur
    Dec 21, 2004
  5. Jorge
    Replies:
    3
    Views:
    148
    Gregor Kofler
    Jul 2, 2008
Loading...

Share This Page