[General] SU(2) equation set

Dr Nicholas J Bailey nicholas.bailey at glasgow.ac.uk
Fri Nov 13 03:21:32 PST 2015


Do you want it to be /fast/?

Python is fast (and fun!) to write but slow to run. Although actually, not 
that slow. Artifastring[1], a modal physical model written by my ex-postgrad 
in C++ as the engine behind Vivi[2], the virtual violinist, actually ran faster 
when bound to Python than when linked to a larger C++ program! I didn't 
look into why. Curious.

Anyway, if you want fast, I'd write in C++ with as much built-in operator 
overloading as you can so that you can read your own code. You can test 
that to hell, then pull it in to Python using swig[3] or sip[4].

Alternatively, I suppose one could think of starting with Python and 
extending the functionality of a numeric module such as numpy[5].

The other advantage of having at least the possibility of running C++ 
instead of Python is that Python doesn't support threads (because of the 
Global Intepreter Lock[6] problem) and if you want to do real heavy duty 
number crunching on multiple cores, you'd best use C++ with boost[7] or 
something like that. Boost is proposed to be included in the standard 
library in C++17 anyway.

Nick/.

On Thursday 12 November 2015 13:37:03 John Williamson wrote:


Firstly need to implement a system with primitive operations which parallel 
the workings of the space-time algebra. Multiplications, divisions and 
differentiations in particular.  It would be nice if such a framework existed 
already, but I do not think so. Stephen has written a suite in PYTHON to 
deal with the multiplications, which may be a start. Not sure what is best 
here: C++?, Python?, Something else? 



--------
[1] http://percival-music.ca/artifastring/
[2] http://percival-music.ca/vivi.html
[3] http://www.swig.org/
[4] https://riverbankcomputing.com/software/sip/intro
[5] http://www.numpy.org/
[6] https://www.jeffknupp.com/blog/2012/03/31/pythons-hardest-problem/
[7] http://www.boost.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.natureoflightandparticles.org/pipermail/general-natureoflightandparticles.org/attachments/20151113/9517000b/attachment.htm>


More information about the General mailing list