Hello Mark and everyone. I've taught shedskin in classes and at PyCons
over the last couple of years. I'm now writing an O'Reilly book on
High Performance Computing and I'm including some shedskin examples
(using 0.9.4).
http://shop.oreilly.com/product/0636920028963.do
I have a Julia Set example (rather similar to my previous Mandelbrot
Set examples for teaching), I'm working through cython (with lists,
arrays and nparrays) and shedskin (and later Numba, maybe Parakeet
etc).
In the Julia Set I build a pair of lists of complex numbers (for zs
and cs), 1,000,000 points in each to represent a reasonable input set.
I then pass these into an extension module.
Can I check a few points?
1) CPython lists (e.g. lists of complex nbrs) are always *copied* into
a ShedSkin extmod, so the memory usage is doubled and there's a time
penalty for copying, right? The same will happen with a result list
being passed back too I guess
2) I've seen mention that slice notation is a slow way to reference
elements - is this true for single item access (e.g. some_list[0]) or
just for range slicing?
3) I see that the array module is supported - are the underlying bytes
shared between processes using array, or are they copied in too?
4) Did anyone ever look into using OpenMP on parallelisable 'for'
loops? I did years back but never got it to work (a la 'prange' in
Cython)
We discuss the 'inertia of data' (i.e. copying large numbers of bytes
is expensive) and I'm wondering if ShedSkin has ways of sharing data
with the parent Python process, hence questions 1) and 3)
Cheers,
Ian.
--
Ian Ozsvald (A.I. researcher)
i...@IanOzsvald.com
http://IanOzsvald.com
http://MorConsulting.com/
http://Annotate.IO
http://SocialTiesApp.com/
http://TheScreencastingHandbook.com
http://FivePoundApp.com/
http://twitter.com/IanOzsvald
http://ShowMeDo.com