vb_function_base¶
argsort¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
e.argsort()
Performance graph
bincount¶
Benchmark setup
d = np.arange(80000, dtype=np.intp)
Benchmark statement
np.bincount(d)
Performance graph
bincount_weights¶
Benchmark setup
d = np.arange(80000, dtype=np.intp); e = d.astype(np.float64)
Benchmark statement
np.bincount(d, weights=e)
Performance graph
median_even¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.median(e)
Performance graph
median_even_inplace¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.median(e, overwrite_input=True)
Performance graph
median_even_small¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.median(e[:500], overwrite_input=True)
Performance graph
median_odd¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.median(o)
Performance graph
median_odd_inplace¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.median(o, overwrite_input=True)
Performance graph
median_odd_small¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.median(o[:500], overwrite_input=True)
Performance graph
percentile¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.percentile(e, [25, 35, 55, 65, 75])
Performance graph
quartile¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.percentile(e, [25, 75])
Performance graph
select¶
Benchmark setup
d = np.arange(20000); e = d.copy();cond = [d > 4, d < 2]
Benchmark statement
np.select(cond, [d, e])
Performance graph
select_larger¶
Benchmark setup
d = np.arange(20000); e = d.copy();cond = [d > 4, d < 2] * 10
Benchmark statement
np.select(cond, [d, e] * 10)
Performance graph
sort¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
np.sort(e)
Performance graph
sort_inplace¶
Benchmark setup
import numpy as np
e = np.arange(10000, dtype=np.float32)
o = np.arange(10001, dtype=np.float32)
Benchmark statement
e.sort()
Performance graph
where_1¶
Benchmark setup
d = np.arange(20000); cond = d > 5000
Benchmark statement
np.where(cond)
Performance graph
where_2¶
Benchmark setup
d = np.arange(20000); e = d.copy(); cond = d > 5000
Benchmark statement
np.where(cond, d, e)
Performance graph
where_2_broadcast¶
Benchmark setup
d = np.arange(20000); cond = d > 5000
Benchmark statement
np.where(cond, d, 0)
Performance graph