[Speed] Should we change what benchmarks we have?

Antoine Pitrou solipsis at pitrou.net
Thu Feb 11 18:26:58 EST 2016


On Thu, 11 Feb 2016 18:16:23 -0500
Yury Selivanov <yselivanov.ml at gmail.com>
wrote:
> >
> >> Yes, spectral_norm is micro-benchmark, but still, there is a lot of
> >> python code out there that does some calculation in pure Python not
> >> involving numpy or pypy.
> > Can you clarify "a lot"?
> 
> Any code that occasionally uses "int [op] int" code.  That code becomes 
> faster (especially if it's small ints).  In tight loops significantly 
> faster (that's what spectral_norm is doing).

I agree for int addition, subtraction, perhaps multiplication. General
math on small integers is not worth really improving, though, IMO.

(and I don't think spectral_norm is representative of anything)

> Look at the pillow package, for instance [1] -- just one of the first 
> packages I thought of -- something non-scientific that happens to do 
> some calculations here and there.

Uh ? I would be extremely surprised if pillow processed images in pure
Python.

Regards

Antoine.




More information about the Speed mailing list