This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python runtests.py --bench -t scipy/linalg/benchmarks/bench_levinson_durbin.py | |
Building, see build.log... | |
Build OK | |
Running benchmarks for scipy | |
NumPy version 1.7.1 | |
NumPy is installed in /usr/lib/python2.7/dist-packages/numpy | |
SciPy version 0.14.0.dev-649d452 | |
SciPy is installed in /home/pauli/prj/scipy/scipy/build/testenv/lib/python2.7/site-packages/scipy | |
Python version 2.7.5+ (default, Sep 19 2013, 13:48:49) [GCC 4.8.1] | |
nose version 1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.sparse import lil_matrix | |
from numpy import where, zeros, prod, vstack, ones | |
from time import time | |
n, m = 1000, 20000 | |
M = vstack((zeros((n, m)), ones((25, m)))) # this changes time for lil very sufficiently | |
I, J = where(M) | |
# 1: time for sparse | |
M = lil_matrix(M) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function "fpinst" not defined. | |
Breakpoint 1 (fpinst) pending. | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". | |
Breakpoint 1, fpinst (iopt=0, t=..., n=104, c=..., k=3, x=0,5, l=81, tt=..., nn=0, cc=..., nest=106) at scipy/interpolate/fitpack/fpinst.f:1 | |
1 subroutine fpinst(iopt,t,n,c,k,x,l,tt,nn,cc,nest) | |
#0 fpinst (iopt=0, t=..., n=104, c=..., k=3, x=0,5, l=81, tt=..., nn=0, cc=..., nest=106) at scipy/interpolate/fitpack/fpinst.f:1 | |
#1 0x00007fffeec867cc in insert (iopt=0, t=..., n=104, c=..., k=3, x=0,5, tt=..., nn=0, cc=..., nest=106, ier=0) at scipy/interpolate/fitpack/insert.f:100 | |
#2 0x00007fffeec78742 in fitpack_insert (dummy=0x0, args=0x15afef0) at scipy/interpolate/src/__fitpack.h:827 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python runtests.py --bench \ | |
-t scipy/sparse/benchmarks/bench_sparse.py:BenchmarkSparse.bench_setitem \ | |
-t scipy/sparse/benchmarks/bench_sparse.py:BenchmarkSparse.bench_getitem | |
BEFORE (32cd96d98b040) AFTER (c5e3ae442639b98) | |
Sparse Matrix fancy __setitem__ Sparse Matrix fancy __setitem__ | |
========================================================== ========================================================== | |
N | s.patt. | csr | csc | lil | dok | N | s.patt. | csr | csc | lil | dok | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
counter.py | |
Count the number of elementwise and matrix multiplication call sites, | |
by running code and intercepting calls. | |
""" | |
import os | |
import sys | |
import argparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <locale.h> | |
#include <stdio.h> | |
int badcall_(); | |
int main() | |
{ | |
FILE *f; | |
f = fopen("bug.dat", "w"); | |
fprintf(f, "1.2345\n"); | |
fclose(f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 | |
5 1 10 0 2 1 | |
5 1 4 0 2 1 | |
5 3 12 0 3 1 | |
5 3 4 0 3 1 | |
5 4 7 0 3 4 | |
5 4 5 0 2 4 | |
6 4 13 1 2 4 3 | |
5 5 14 0 4 2 | |
5 7 16 3 4 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy import sparse | |
import time | |
import pysparse | |
def main(): | |
print "%-6s %15s %15s " % ("% N", "scipy.sparse", "pysparse") | |
for N in xrange(5, 16): | |
N = 2**N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Levinson-Durbin vs. generic solver | |
T x = y; T.shape == (n, n); y.shape == (n, m) | |
============================================================== | |
n | m | dtype | L-D time | generic time | |
| | | (seconds) | | |
-------------------------------------------------------------- | |
100 | 1 | float64 | 0.00122 | 0.00189 | |
100 | 10 | float64 | 0.00727 | 0.0019 | |
100 | 100 | float64 | 0.0666 | 0.00459 | |
100 | 1000 | float64 | 0.614 | 0.0171 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Levinson-Durbin [Cython version from pr-4302] vs. generic solver | |
T x = y; T.shape == (n, n); y.shape == (n, m) | |
============================================================== | |
n | m | dtype | L-D time | generic time | |
| | | (seconds) | | |
-------------------------------------------------------------- | |
100 | 1 | float64 | 0.000103 | 0.000162 | |
100 | 10 | float64 | 0.000561 | 0.000167 | |
300 | 1 | float64 | 0.000258 | 0.00136 |
OlderNewer