Using psyco is really easy. After installing it you only have to write the following two lines.
Psyco didn't speedup my shortest path calculations.
If you want to know more about psyco I suggest you to read the documentation.
In order to test PyPy I downloaded the latest windows binary and ran my code against PyPy instead of CPython by invoking my script on the command line with pypy.exe.
The startup time is a lot longer for PyPy but if you don't take this startup cost into account then the speedup on my machine is in the range of 10-20% for shortest path routing with NetworkX.
So far my tests. Any suggestions ?
Just a quick note to let you know that the Python graph library NetworkX (version 1.1), which by the way is really good, can be ported to Jython with some minor modifications. Sadly enough you loose some performance in the process.
The two changes I made to get it running where :
- Because numpy doesn't exist for Jython you can't use the current_flow_closeness_centrality function in current_flow_closeness.py. I moved the
import numpy as npstatement at the top to the _compute_C function at the bottom.
- In the __init__.py file under generators I commented
from atlas import *out.
In the following weeks I will try to port a small subset off NetworkX to Java or Scala. Hopefully I'll be able to outperform the Jython and CPython version.
Just watched Dr. Albert A. Bartlett's presentation on "Arithmetic, Population, and Energy." on youtube. It's really good and entertaining. It's in 8 parts and I encourage you to watch them all.
The url of part 1 is : http://www.youtube.com/watch?v=F-QA2rkpBSY