Skip to content

Commit b22bf37

Browse files
committed
Merge pull request #5 from pyHPC/speed-cython
Update speed up Python part of course.
2 parents 5ce9b1e + 21c1596 commit b22bf37

File tree

8 files changed

+20
-704
lines changed

8 files changed

+20
-704
lines changed

examples/cython/fib/fib-exercise/fib.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ function (named so we can distinguish it from the sped-up versions of `fib()`).
77
88
For baseline timings, lets time its performance in the IPython interpreter:
99
10-
$ ipython
11-
[...]
10+
$ ipython --no-banner
11+
1212
In [1]: from pyfib import pyfib
1313
1414
In [2]: %timeit pyfib(10)
@@ -34,8 +34,8 @@ directory.
3434
2. You can load this extension module in an interactive interpreter (here,
3535
IPython), like so:
3636
37-
$ ipython
38-
[...]
37+
$ ipython --no-banner
38+
3939
In [1]: from fib import fib
4040
4141
In [2]: fib(10)

examples/cython/fib/fib-exercise/fib_solution.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ function (named so we can distinguish it from the sped-up versions of `fib()`).
77
88
For baseline timings, lets time its performance in the IPython interpreter:
99
10-
$ ipython
11-
[...]
10+
$ ipython --no-banner
11+
1212
In [1]: from pyfib import pyfib
1313
1414
In [2]: %timeit pyfib(10)
@@ -34,8 +34,8 @@ directory.
3434
2. You can load this extension module in an interactive interpreter (here,
3535
IPython), like so:
3636
37-
$ ipython
38-
[...]
37+
$ ipython --no-banner
38+
3939
In [1]: from fib import fib
4040
4141
In [2]: fib(10)

examples/cython/fib/fib-exercise/pyfib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
88
For baseline timings, lets time its performance in the IPython interpreter:
99
10-
$ ipython
11-
[...]
10+
$ ipython --no-banner
11+
1212
In [1]: from pyfib import pyfib
1313
1414
In [2]: %timeit pyfib(10)
@@ -34,8 +34,8 @@
3434
2. You can load this extension module in an interactive interpreter (here,
3535
IPython), like so:
3636
37-
$ ipython
38-
[...]
37+
$ ipython --no-banner
38+
3939
In [1]: from fib import fib
4040
4141
In [2]: fib(10)

examples/cython/fib/fib-exercise/setup_fib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
88
For baseline timings, lets time its performance in the IPython interpreter:
99
10-
$ ipython
11-
[...]
10+
$ ipython --no-banner
11+
1212
In [1]: from pyfib import pyfib
1313
1414
In [2]: %timeit pyfib(10)
@@ -34,8 +34,8 @@
3434
2. You can load this extension module in an interactive interpreter (here,
3535
IPython), like so:
3636
37-
$ ipython
38-
[...]
37+
$ ipython --no-banner
38+
3939
In [1]: from fib import fib
4040
4141
In [2]: fib(10)

examples/cython/fib/fib-exercise/setup_fib_solution.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
88
For baseline timings, lets time its performance in the IPython interpreter:
99
10-
$ ipython
11-
[...]
10+
$ ipython --no-banner
11+
1212
In [1]: from pyfib import pyfib
1313
1414
In [2]: %timeit pyfib(10)
@@ -34,8 +34,8 @@
3434
2. You can load this extension module in an interactive interpreter (here,
3535
IPython), like so:
3636
37-
$ ipython
38-
[...]
37+
$ ipython --no-banner
38+
3939
In [1]: from fib import fib
4040
4141
In [2]: fib(10)

pdf/02_Speeding_Python.pdf

-129 KB
Binary file not shown.

0 commit comments

Comments
 (0)