Vbench performance benchmarks for NumPy

vb_reduce

max_np.float32

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(20000, dtype=np.float32)

Benchmark statement

np.max(d)

Performance graph

_images/max_np.float32.png

max_np.float64

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(20000, dtype=np.float64)

Benchmark statement

np.max(d)

Performance graph

_images/max_np.float64.png

max_np.intp

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(20000, dtype=np.intp)

Benchmark statement

np.max(d)

Performance graph

_images/max_np.intp.png

min_np.float32

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(20000, dtype=np.float32)

Benchmark statement

np.min(d)

Performance graph

_images/min_np.float32.png

min_np.float64

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(20000, dtype=np.float64)

Benchmark statement

np.min(d)

Performance graph

_images/min_np.float64.png

min_np.intp

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(20000, dtype=np.intp)

Benchmark statement

np.min(d)

Performance graph

_images/min_np.intp.png

numpy.add.reduce(axis=0)

Benchmark setup

from numpy_vb_common import *

Benchmark statement

[numpy.add.reduce(a, axis=0) for a in squares.itervalues()]

Performance graph

_images/numpy.add.reduce_axis=0_.png

numpy.add.reduce(axis=0)_complex128

Benchmark setup

from numpy_vb_common import *

a = squares['complex128']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__complex128.png

numpy.add.reduce(axis=0)_complex256

Benchmark setup

from numpy_vb_common import *

a = squares['complex256']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__complex256.png

numpy.add.reduce(axis=0)_complex64

Benchmark setup

from numpy_vb_common import *

a = squares['complex64']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__complex64.png

numpy.add.reduce(axis=0)_float16

Benchmark setup

from numpy_vb_common import *

a = squares['float16']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__float16.png

numpy.add.reduce(axis=0)_float32

Benchmark setup

from numpy_vb_common import *

a = squares['float32']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__float32.png

numpy.add.reduce(axis=0)_float64

Benchmark setup

from numpy_vb_common import *

a = squares['float64']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__float64.png

numpy.add.reduce(axis=0)_int16

Benchmark setup

from numpy_vb_common import *

a = squares['int16']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__int16.png

numpy.add.reduce(axis=0)_int32

Benchmark setup

from numpy_vb_common import *

a = squares['int32']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__int32.png

numpy.add.reduce(axis=0)_int64

Benchmark setup

from numpy_vb_common import *

a = squares['int64']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__int64.png

numpy.add.reduce(axis=0)_longfloat

Benchmark setup

from numpy_vb_common import *

a = squares['longfloat']

Benchmark statement

numpy.add.reduce(a, axis=0)

Performance graph

_images/numpy.add.reduce_axis=0__longfloat.png

numpy.add.reduce(axis=1)

Benchmark setup

from numpy_vb_common import *

Benchmark statement

[numpy.add.reduce(a, axis=1) for a in squares.itervalues()]

Performance graph

_images/numpy.add.reduce_axis=1_.png

numpy.add.reduce(axis=1)_complex128

Benchmark setup

from numpy_vb_common import *

a = squares['complex128']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__complex128.png

numpy.add.reduce(axis=1)_complex256

Benchmark setup

from numpy_vb_common import *

a = squares['complex256']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__complex256.png

numpy.add.reduce(axis=1)_complex64

Benchmark setup

from numpy_vb_common import *

a = squares['complex64']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__complex64.png

numpy.add.reduce(axis=1)_float16

Benchmark setup

from numpy_vb_common import *

a = squares['float16']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__float16.png

numpy.add.reduce(axis=1)_float32

Benchmark setup

from numpy_vb_common import *

a = squares['float32']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__float32.png

numpy.add.reduce(axis=1)_float64

Benchmark setup

from numpy_vb_common import *

a = squares['float64']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__float64.png

numpy.add.reduce(axis=1)_int16

Benchmark setup

from numpy_vb_common import *

a = squares['int16']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__int16.png

numpy.add.reduce(axis=1)_int32

Benchmark setup

from numpy_vb_common import *

a = squares['int32']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__int32.png

numpy.add.reduce(axis=1)_int64

Benchmark setup

from numpy_vb_common import *

a = squares['int64']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__int64.png

numpy.add.reduce(axis=1)_longfloat

Benchmark setup

from numpy_vb_common import *

a = squares['longfloat']

Benchmark statement

numpy.add.reduce(a, axis=1)

Performance graph

_images/numpy.add.reduce_axis=1__longfloat.png

numpy.all_fast

Benchmark setup

from numpy_vb_common import *
d = numpy.zeros(100000, numpy.bool)

Benchmark statement

d.all()

Performance graph

_images/numpy.all_fast.png

numpy.all_slow

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(100000, numpy.bool)

Benchmark statement

d.all()

Performance graph

_images/numpy.all_slow.png

numpy.any_fast

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(100000, numpy.bool)

Benchmark statement

d.any()

Performance graph

_images/numpy.any_fast.png

numpy.any_slow

Benchmark setup

from numpy_vb_common import *
d = numpy.zeros(100000, numpy.bool)

Benchmark statement

d.any()

Performance graph

_images/numpy.any_slow.png

numpy.small_reduction

Benchmark setup

from numpy_vb_common import *
d = numpy.ones(100, dtype=numpy.float32)

Benchmark statement

numpy.sum(d)

Performance graph

_images/numpy.small_reduction.png