Vbench performance benchmarks for NumPy

vb_linalg

numpy.dot(a, b)

Benchmark setup

import numpy
a = numpy.arange(60000.).reshape(150, 400)
b = numpy.arange(240000.).reshape(400, 600)
c = numpy.arange(600)
d = numpy.arange(400)

Benchmark statement

numpy.dot(a, b)

Performance graph

_images/numpy.dot_a__b_.png

numpy.dot(d, numpy.dot(b, c))

Benchmark setup

import numpy
a = numpy.arange(60000.).reshape(150, 400)
b = numpy.arange(240000.).reshape(400, 600)
c = numpy.arange(600)
d = numpy.arange(400)

Benchmark statement

numpy.dot(d, numpy.dot(b, c))

Performance graph

_images/numpy.dot_d__numpy.dot_b__c__.png

numpy.einsum(‘i,ij,j’, d, b, c)

Benchmark setup

import numpy
a = numpy.arange(60000.).reshape(150, 400)
b = numpy.arange(240000.).reshape(400, 600)
c = numpy.arange(600)
d = numpy.arange(400)

Benchmark statement

numpy.einsum('i,ij,j', d, b, c)

Performance graph

_images/numpy.einsum_'i_ij_j'__d__b__c_.png

numpy.einsum(‘ij,jk’, a, b)

Benchmark setup

import numpy
a = numpy.arange(60000.).reshape(150, 400)
b = numpy.arange(240000.).reshape(400, 600)
c = numpy.arange(600)
d = numpy.arange(400)

Benchmark statement

numpy.einsum('ij,jk', a, b)

Performance graph

_images/numpy.einsum_'ij_jk'__a__b_.png

numpy.einsum(‘ijk,jil->kl’, a, b)

Benchmark setup

import numpy
a = numpy.arange(480000.).reshape(60, 80, 100)
b = numpy.arange(192000.).reshape(80, 60, 40)

Benchmark statement

numpy.einsum('ijk,jil->kl', a, b)

Performance graph

_images/numpy.einsum_'ijk_jil_>kl'__a__b_.png

numpy.linalg.det(a)_complex128

Benchmark setup

from numpy_vb_common import *
a=squares_['complex128']

Benchmark statement

numpy.linalg.det(a)

Performance graph

_images/numpy.linalg.det_a__complex128.png

numpy.linalg.det(a)_complex64

Benchmark setup

from numpy_vb_common import *
a=squares_['complex64']

Benchmark statement

numpy.linalg.det(a)

Performance graph

_images/numpy.linalg.det_a__complex64.png

numpy.linalg.det(a)_float32

Benchmark setup

from numpy_vb_common import *
a=squares_['float32']

Benchmark statement

numpy.linalg.det(a)

Performance graph

_images/numpy.linalg.det_a__float32.png

numpy.linalg.det(a)_float64

Benchmark setup

from numpy_vb_common import *
a=squares_['float64']

Benchmark statement

numpy.linalg.det(a)

Performance graph

_images/numpy.linalg.det_a__float64.png

numpy.linalg.det(a)_int16

Benchmark setup

from numpy_vb_common import *
a=squares_['int16']

Benchmark statement

numpy.linalg.det(a)

Performance graph

_images/numpy.linalg.det_a__int16.png

numpy.linalg.det(a)_int32

Benchmark setup

from numpy_vb_common import *
a=squares_['int32']

Benchmark statement

numpy.linalg.det(a)

Performance graph

_images/numpy.linalg.det_a__int32.png

numpy.linalg.det(a)_int64

Benchmark setup

from numpy_vb_common import *
a=squares_['int64']

Benchmark statement

numpy.linalg.det(a)

Performance graph

_images/numpy.linalg.det_a__int64.png

numpy.linalg.lstsq(a, b)_float64

Benchmark setup

from numpy_vb_common import *
a=squares_['float64']; b=indexes_rand[:100].astype(numpy.float64)

Benchmark statement

numpy.linalg.lstsq(a, b)

Performance graph

_images/numpy.linalg.lstsq_a__b__float64.png

numpy.linalg.norm(a)_complex128

Benchmark setup

from numpy_vb_common import *
a=squares_['complex128']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__complex128.png

numpy.linalg.norm(a)_complex256

Benchmark setup

from numpy_vb_common import *
a=squares_['complex256']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__complex256.png

numpy.linalg.norm(a)_complex64

Benchmark setup

from numpy_vb_common import *
a=squares_['complex64']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__complex64.png

numpy.linalg.norm(a)_float16

Benchmark setup

from numpy_vb_common import *
a=squares_['float16']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__float16.png

numpy.linalg.norm(a)_float32

Benchmark setup

from numpy_vb_common import *
a=squares_['float32']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__float32.png

numpy.linalg.norm(a)_float64

Benchmark setup

from numpy_vb_common import *
a=squares_['float64']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__float64.png

numpy.linalg.norm(a)_int16

Benchmark setup

from numpy_vb_common import *
a=squares_['int16']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__int16.png

numpy.linalg.norm(a)_int32

Benchmark setup

from numpy_vb_common import *
a=squares_['int32']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__int32.png

numpy.linalg.norm(a)_int64

Benchmark setup

from numpy_vb_common import *
a=squares_['int64']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__int64.png

numpy.linalg.norm(a)_longfloat

Benchmark setup

from numpy_vb_common import *
a=squares_['longfloat']

Benchmark statement

numpy.linalg.norm(a)

Performance graph

_images/numpy.linalg.norm_a__longfloat.png

numpy.linalg.pinv(a)_complex128

Benchmark setup

from numpy_vb_common import *
a=squares_['complex128']

Benchmark statement

numpy.linalg.pinv(a)

Performance graph

_images/numpy.linalg.pinv_a__complex128.png

numpy.linalg.pinv(a)_complex64

Benchmark setup

from numpy_vb_common import *
a=squares_['complex64']

Benchmark statement

numpy.linalg.pinv(a)

Performance graph

_images/numpy.linalg.pinv_a__complex64.png

numpy.linalg.pinv(a)_float32

Benchmark setup

from numpy_vb_common import *
a=squares_['float32']

Benchmark statement

numpy.linalg.pinv(a)

Performance graph

_images/numpy.linalg.pinv_a__float32.png

numpy.linalg.pinv(a)_float64

Benchmark setup

from numpy_vb_common import *
a=squares_['float64']

Benchmark statement

numpy.linalg.pinv(a)

Performance graph

_images/numpy.linalg.pinv_a__float64.png

numpy.linalg.pinv(a)_int16

Benchmark setup

from numpy_vb_common import *
a=squares_['int16']

Benchmark statement

numpy.linalg.pinv(a)

Performance graph

_images/numpy.linalg.pinv_a__int16.png

numpy.linalg.pinv(a)_int32

Benchmark setup

from numpy_vb_common import *
a=squares_['int32']

Benchmark statement

numpy.linalg.pinv(a)

Performance graph

_images/numpy.linalg.pinv_a__int32.png

numpy.linalg.pinv(a)_int64

Benchmark setup

from numpy_vb_common import *
a=squares_['int64']

Benchmark statement

numpy.linalg.pinv(a)

Performance graph

_images/numpy.linalg.pinv_a__int64.png

numpy.linalg.svd(a)_complex128

Benchmark setup

from numpy_vb_common import *
a=squares_['complex128']

Benchmark statement

numpy.linalg.svd(a)

Performance graph

_images/numpy.linalg.svd_a__complex128.png

numpy.linalg.svd(a)_complex64

Benchmark setup

from numpy_vb_common import *
a=squares_['complex64']

Benchmark statement

numpy.linalg.svd(a)

Performance graph

_images/numpy.linalg.svd_a__complex64.png

numpy.linalg.svd(a)_float32

Benchmark setup

from numpy_vb_common import *
a=squares_['float32']

Benchmark statement

numpy.linalg.svd(a)

Performance graph

_images/numpy.linalg.svd_a__float32.png

numpy.linalg.svd(a)_float64

Benchmark setup

from numpy_vb_common import *
a=squares_['float64']

Benchmark statement

numpy.linalg.svd(a)

Performance graph

_images/numpy.linalg.svd_a__float64.png

numpy.linalg.svd(a)_int16

Benchmark setup

from numpy_vb_common import *
a=squares_['int16']

Benchmark statement

numpy.linalg.svd(a)

Performance graph

_images/numpy.linalg.svd_a__int16.png

numpy.linalg.svd(a)_int32

Benchmark setup

from numpy_vb_common import *
a=squares_['int32']

Benchmark statement

numpy.linalg.svd(a)

Performance graph

_images/numpy.linalg.svd_a__int32.png

numpy.linalg.svd(a)_int64

Benchmark setup

from numpy_vb_common import *
a=squares_['int64']

Benchmark statement

numpy.linalg.svd(a)

Performance graph

_images/numpy.linalg.svd_a__int64.png

numpy.tensordot(a, b, axes=([1,0], [0,1]))

Benchmark setup

import numpy
a = numpy.arange(480000.).reshape(60, 80, 100)
b = numpy.arange(192000.).reshape(80, 60, 40)

Benchmark statement

numpy.tensordot(a, b, axes=([1,0], [0,1]))

Performance graph

_images/numpy.tensordot_a__b__axes=__1_0____0_1___.png