Performance of int/long in Python 3

Cousin Stanley cousinstanley at gmail.com
Tue Mar 26 12:41:13 EDT 2013


Chris Angelico wrote:

> Once again, Py3 is slower on small integers than Py2. 

  Chris Angelico  
  Ubuntu Karmic. 
  Pentium(R) Dual-Core  CPU E6500  @ 2.93GHz.

  python  inline  range_sum  forloop  forloop_offset

  2.6.4   2.7050  2.6492      6.5877  16.5168 

  3.1.1   4.4453  4.3731     12.4834  13.5001

  You do seem to have a slight py3 improvement
  under ubuntu for the  forloop_offset  case ....


> So where's the difference with your system ? 

  CPU ????


> This is really weird ! 

  Yep ...


> I assume you can repeat the tests 
> and get the same result every time ?

  Yes ....

  First lines of numbers below are from yesterday
  while second lines are from today ....

  Stanley C. Kitching
  Debian Wheezy
  Intel(R) Celeron(R) D CPU 3.33GH  Single Core

  python  inline  range_sum  forloop  forloop_offset

  2.7.3   3.1359  3.0725     9.0778   15.6475
  2.7.3   3.0382  3.1452     9.8799   16.8579

  3.2.3   2.8226  2.8074    13.47624  13.6430 
  3.2.3   2.8331  2.8228    13.54151  13.8716


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona




More information about the Python-list mailing list