Message from discussion
Bottleneck 0.6 release candidate 1
Received: by 10.52.240.229 with SMTP id wd5mr20715704vdc.8.1338274580801;
Mon, 28 May 2012 23:56:20 -0700 (PDT)
X-BeenThere: bottle-neck@googlegroups.com
Received: by 10.52.93.230 with SMTP id cx6ls2716315vdb.6.gmail; Mon, 28 May
2012 23:56:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.68.141 with SMTP id w13mr454780vdt.18.1338274580417; Mon,
28 May 2012 23:56:20 -0700 (PDT)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
chrissp...@gmail.com designates internal as permitted sender)
smtp.mail=chrissp...@gmail.com; dkim=pass
header...@gmail.com
Received: by b26g2000vbt.googlegroups.com with HTTP; Mon, 28 May 2012 23:56:20
-0700 (PDT)
Date: Mon, 28 May 2012 23:56:20 -0700 (PDT)
In-Reply-To: <CAB6Y536a-0_EnBX3F=C2EPNuFNqj2fqSU_zJzQgw0xEjskgn4g@mail.gmail.com>
References: <CAB6Y5359aWD4oz3h6Yx6wz0YPL0D4swBCEwehXV8oSwYdvG8SA@mail.gmail.com>
<e952554d-9ca0-4cd2-8492-3dfa392e2b33@eh4g2000vbb.googlegroups.com> <CAB6Y536a-0_EnBX3F=C2EPNuFNqj2fqSU_zJzQgw0xEjskgn4g@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0),gzip(gfe)
Message-ID: <9181de8c-cf46-44fc-8be4-49e52fe03657@b26g2000vbt.googlegroups.com>
Subject: Re: Bottleneck 0.6 release candidate 1
From: chrisspalm <chrissp...@gmail.com>
To: bottle-neck <bottle-neck@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Here's the bench too on the same machine.
In [4]: bn.bench()
Bottleneck performance benchmark
Bottleneck 0.6.0rc1
Numpy (np) 1.6.1
Scipy (sp) 0.9.0
Speed is NumPy or SciPy time divided by Bottleneck time
NaN means one-third NaNs; float64 and axis=1 are used
High-level functions used (mode='fast')
no NaN no NaN no NaN NaN
NaN NaN
(10,10) (100,100) (1000,1000) (10,10) (100,100)
(1000,1000)
median 3.57 1.71 2.34 3.37
2.97 5.74
nanmedian 89.44 22.43 5.21 55.33
10.95 1.87
nansum 7.41 4.07 5.63 4.06
0.40 0.68
nanmax 1.64 1.16 1.01 1.43
1.09 1.07
nanmean 17.50 8.69 9.38 9.92
1.70 1.83
nanstd 24.90 6.43 9.11 10.66
1.02 1.31
nanargmax 5.94 3.86 6.58 3.51
0.44 0.69
ss 3.84 2.82 5.51 1.91
1.40 1.41
rankdata 23.56 17.00 13.55 12.55
8.63 5.36
partsort 1.16 1.81 2.40 2.60
3.49 6.68
argpartsort 0.62 1.78 2.01 2.10
3.41 6.30
replace 2.88 2.21 2.22 2.88
2.21 2.00
anynan 2.47 3.07 2.84 1.96
3.84 46.74
move_sum 8.58 100.22 623.85 5.32 48.87
495.47
move_nansum 20.11 112.98 683.94 9.58 12.79
118.75
move_mean 8.46 71.84 531.29 5.27 48.54
487.48
move_nanmean 21.71 81.16 563.07 10.88 12.03
108.60
move_std 10.49 24.87 222.32 13.43 88.00
818.85
move_nanstd 26.43 38.19 328.89 15.69 16.64
146.23
move_max 3.64 17.67 147.75 2.21 16.34
161.52
move_nanmax 14.47 20.61 163.93 7.34
6.91 62.78
Reference functions:
median np.median
nanmedian local copy of sp.stats.nanmedian
nansum np.nansum
nanmax np.nanmax
nanmean local copy of sp.stats.nanmean
nanstd local copy of sp.stats.nanstd
nanargmax np.nanargmax
ss scipy.stats.ss
rankdata scipy.stats.rankdata based (axis support added)
partsort np.sort, n=max(a.shape[1]/2,1)
argpartsort np.argsort, n=max(a.shape[1]/2,1)
replace np.putmask based (see bn.slow.replace)
anynan np.isnan(arr).any(axis)
move_sum sp.ndimage.convolve1d based, window=a.shape[1] // 5
move_nansum sp.ndimage.convolve1d based, window=a.shape[1] // 5
move_mean sp.ndimage.convolve1d based, window=a.shape[1] // 5
move_nanmean sp.ndimage.convolve1d based, window=a.shape[1] // 5
move_std sp.ndimage.convolve1d based, window=a.shape[1] // 5
move_nanstd sp.ndimage.convolve1d based, window=a.shape[1] // 5
move_max sp.ndimage.maximum_filter1d based, window=a.shape[1] //
5
move_nanmax sp.ndimage.maximum_filter1d based, window=a.shape[1] //