Why is this question so beloved? Re: Is python really slow?

Jeremy Yallop jeremy at jdyallop.freeserve.co.uk
Wed May 22 12:09:01 EDT 2002


* George Demmy
| "Python" is *much* "faster" than "Perl", "php", or "C" at answering
| this question:
| 
| What is the integer value of 2 raised to the power of 10000?
| 
| $ time python -c 'print 2**10000'
| 
| [answer snipped]
| 
| real    0m0.416s
| user    0m0.410s
| sys     0m0.000s
| 
| So what do you mean? Perl coders --- bring it! C coders -- bring it!

  $ time python -c 'print 2**10000'  

  [answer snipped]

  real    0m0.226s
  user    0m0.070s
  sys     0m0.010s

  $ time clisp -q -x '(expt 2 10000)'

  [answer snipped]

  real    0m0.038s
  user    0m0.030s
  sys     0m0.000s

| Lisp hackers would snicker having endured years of this line of
| badgering, no doubt,

No doubt.

Jeremy.



More information about the Python-list mailing list