Re: Does Glowscript have numpy-like performance?

Bruce Sherwood <[email protected]> Thu, 7 Jun 2012 22:47:34 -0600
Newsgroups gmane.comp.python.visualpython.user
Message-ID <CAFDG03h4REc4cCF7uTVaxZ=+Buc+togrzCWyi4FzZLh7NZoRSQ@mail.gmail.com>
I've now converted the VPython demo program gas.py to GlowScript:

http://www.glowscript.org/#/user/GlowScriptDemos/folder/Examples/program/HardSphereGas

To run the program, you need to have a WebGL-enabled browser and a
modern graphics card. For details, see the Help at glowscript.org.

As for speed, this is what I found:

VPython gas.py with 100 atoms, dt = 1e-5, no graphing: 100 iterations
= 1.1 seconds. This similar Glowsript program with same conditions:
100 iterations = 11.7 seconds. Presumably the big difference is the
Python numpy library, which runs at C speed, and which eliminates some
explicit loops.

Bruce Sherwood

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/