On Nov 19, 2007 10:32 AM, blaine <[EMAIL PROTECTED]> wrote: > Hey guys, > For my Network Security class we are designing a project that will, > among other things, implement a Diffie Hellman secret key exchange. > The rest of the class is doing Java, while myself and a classmate are > using Python (as proof of concept). I am having problems though with > crunching huge numbers required for calculations. As an alternative I > can use Java - but I'd rather have a pure python implementation. The > problem is that Python takes a very long time (I haven't had it finish > yet) - but Java does it in 3 seconds. Suggestions? >
Python is quite slow for pure number crunching. Most people use the numeric/numpy modules and/or psyco to speed up math. Python + psyco approaches Java for the simple integer operations I've tested. -- http://mail.python.org/mailman/listinfo/python-list