Speed¶
In summary:
Function | sw-i0S / np | sw-iOS / ml | sw-iOS / sw-OSX |
pe1 | 6.21 | 7.43 | 4.46 |
pe10 | 1.55 | 6.16 | 5.01 |
pe73 | 25.00 | 104.5 | 3.35 |
pi_approx | 8.79 | 36.7 | 3.71 |
soft_thresh | 0.22 | 0.74 | 10.53 |
Note
To condense this table I use np
for NumPy, ml
for Matlab and sw
for swix.
Note
All tests were run under Xcode beta 6
Note
OSX tests were run on my machine, a 2012 macbook air with an SSD and 8GB RAM and iOS tests were run on my iPhone 5.
All functions are on Github for your browsing.
Times¶
Time in seconds on my Macbook Air:
Function | -Onone | -O | -Ounchecked |
pe1 | 1.96 | 0.239 | 0.236 |
pe10 | 3.04 | 0.662 | 0.632 |
pe73 | 4.95 | 0.344 | 0.343 |
pi_approx | 0.63 | 0.109 | 0.111 |
soft_threshold | 0.016 | 0.0017 | 0.0018 |
Time in seconds on my iPhone 5:
Function | -Onone | -O | -Ounchecked |
pe1 | 74.08 | 1.072 | 1.055 |
pe10 | 110.91 | 3.190 | 3.165 |
pe73 | 48.70 | 1.15 | 1.21 |
pi_approx | 28.04 | 0.422 | 0.404 |
soft_threshold | 0.720 | 0.0197 | 0.0179 |
And we should also compare against NumPy/Matlab and Julia!
Function | NumPy | Matlab | Julia | swix-OSX | swix-iOS |
pe1 | 0.170 | 0.142 | 0.002 | 0.236 | 1.050 |
pe10 | 2.04 | 0.514 | 0.120 | 0.632 | 3.165 |
pe73 | 0.132 | 0.188 | 0.305 | 0.342 | 0.154 |
pi_approx | 0.046 | 0.011 | 0.087 | 0.109 | 0.404 |
soft_threshold | 0.081 | 0.024 | 0.011 | 0.0017 | 0.0179 |