/
presentation.pin
executable file
·44 lines (33 loc) · 1.35 KB
/
presentation.pin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/pinpoint -m
[white]
[text-color=black]
[font=Monospace 16px]
[shading-color=white]
[shading-opacity=0.0]
[transition=fade]
-- [black] [text-color=white] [font=Sans 40px] [shading-color=black] [shading-opacity=0.66]
Interfacing with Native code from Python
-- [black] [text-color=white] [font=Sans 40px] [shading-color=black] [shading-opacity=0.66]
Why
✔ speeding up hot loops
✔ interfacing with native libraries
✔ improving performance in multi-threaded applications
✔ interfacing with other computational environments
✔ enjoying segfaults
-- [slide-contents-exec=source-highlight -s c -i lib/libprime.h -o STDOUT --outlang-def=./pango.outlang]
-- [slide-contents-exec=source-highlight -s py -i lib/modlibprime.pyx -o STDOUT --outlang-def=./pango.outlang]
-- [slide-contents-exec=source-highlight -s py -i lib/ctlibprime.py -o STDOUT --outlang-def=./pango.outlang]
R example
GObject / Qt
http://davidz25.blogspot.com/2011/07/writing-c-library-intro-conclusion-and.html
http://0pointer.de/blog/projects/libabc.html
Profiling
http://packages.python.org/line_profiler/
GIL
http://wiki.python.org/moin/GlobalInterpreterLock
Weave/etc (from email)
Numpy
http://www.scipy.org/PerformancePython
http://www.scipy.org/Cookbook/Ctypes
http://rebrained.com/?p=458
http://technicaldiscovery.blogspot.com/2011/06/speeding-up-python-numpy-cython-and.html