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. Advertisements

  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. Advertisements

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. Raymond Arthur St. Marie II of III

    very Very VERY dumb Question About The new Set( ) 's

    Raymond Arthur St. Marie II of III, Jul 23, 2003, in forum: Python
    Replies:
    4
    Views:
    729
    Raymond Hettinger
    Jul 27, 2003
  2. Bowen Chiu
    Replies:
    1
    Views:
    670
    Skip Montanaro
    Aug 9, 2003
  3. Replies:
    1
    Views:
    997
    Andrew Dalke
    Jan 12, 2004
  4. shanx__=|;-

    very very very long integer

    shanx__=|;-, Oct 16, 2004, in forum: C Programming
    Replies:
    19
    Views:
    2,060
    Merrill & Michele
    Oct 19, 2004
  5. Abhishek Jha

    very very very long integer

    Abhishek Jha, Oct 16, 2004, in forum: C Programming
    Replies:
    4
    Views:
    729
    jacob navia
    Oct 17, 2004
  6. Peter

    Very very very basic question

    Peter, Feb 8, 2005, in forum: C Programming
    Replies:
    14
    Views:
    824
    Dave Thompson
    Feb 14, 2005
  7. olivier.melcher

    Help running a very very very simple code

    olivier.melcher, May 12, 2008, in forum: Java
    Replies:
    8
    Views:
    2,797
  8. dede
    Replies:
    6
    Views:
    260
    A. Sinan Unur
    Dec 21, 2004
Loading...