← Back to team overview

larry-discuss team mailing list archive

Benchmark suite

 

I hacked together a proof of concept of a benchmark suite for the la
package. I expect it can be adapted to other packages. If you'd like
any changes to generalize it, push them to me or make a branch on
launchpad. I'm taking a break from la development, so I dumped my
prototype into la's sandbox:

http://bazaar.launchpad.net/~kwgoodman/larry/trunk/annotate/head:/sandbox/bench.py
http://bazaar.launchpad.net/~kwgoodman/larry/trunk/annotate/head:/sandbox/autotimeit.py

Example:

Benchmark la 0.2:

>> from bench import bench
>> la2 = bench(verbose=False)
>> la.save('/tmp/la2', la2, 'la2')

Benchmark la 0.3beta and calculate speed up factor relative to la 0.2:

>> from bench import bench
>> la3beta = bench(verbose=False)
>> la2 = la.load('/tmp/la2', 'la2')
>> la2 / la3beta

label_0
    x + x
    x + y
    x.exp()
    x.log()
    x.merge(y, update=True)
    x.morph(idx, axis=0)
    x.power(q=2)
    x.sqrt()
label_1
    (1000,)
    (500,500)
x
array([[ 141.44616248,    5.69072826],
       [  54.18538907,    9.44969135],
       [  43.29922116,    1.18683347],
       [  31.49478962,    1.12828079],
       [  40.59399862,    1.50505723],
       [  46.32767   ,    2.3244576 ],
       [  56.32103173,    1.29797342],
       [  58.27247131,    1.27002216]])