-
Notifications
You must be signed in to change notification settings - Fork 12
/
README.rst
77 lines (49 loc) · 1.84 KB
/
README.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
================
Numpy Benchmarks
================
A collection of scientific kernels that use the numpy package, for benchmarking
purpose.
Usage
=====
First setup the benchmarking environment::
> pip install .
> np-bench setup
Then run the whole benchmark suite::
> np-bench run
To run a specific set of benchmarks on a specific set of compilers, use the
ad hoc arguments , as in::
> np-bench run -tnumba -tpythran benchmarks/harris.py benchmarks/evolve.py
It is possible to post-process the raw output of ``np-bench run``, for
instance to plot the result as ``png``::
> np-bench run -tpython -tpythran > run.log
> np-bench format -tpng run.log
Install
=======
Through pip::
> pip install numpy_benchmarks
Or locally::
> python setup.py install
Usage
=====
To list available benchmarks::
> np-bench list
To run the whole benchmark suite and save the output::
> np-bench run -o run.log
To post-process the output of ``np-bench run``, for
instance to plot the result as ``png``::
> np-bench format -tpng run.log
To compare multiple version of the same tool, the following can be handy::
> np-bench run -tpythran -o ref.log -p ref-
> # change pythran version, branch, whatever
> np-bench run -tpythran -o new.log -p new-
> np-bench format ref.log new.log
=======
> np-bench run -tpython ${prefix}/benchmarks/harris.py
harris Python 5431 5454 14
What does it mean? ``python`` is used as single engine through ``-tpython``. The
code from ``${prefix}/benchmarks/harris.py`` (where you can get the value of
``${prefix}`` from ``np-bench list``) was run through ``timeit`` using the
``#setup`` and ``#run`` code. It outputs (in that order and in nanoseconds):
1. the **best** execution time among all runs;
2. the **average** execution time of the runs;
3. the **standard deviation** of the runs.