On Fri, 14 Jan 2011 11:52:21 -0800, mukesh tiwari wrote: > Hello all , I have implemented Elliptic curve prime factorisation using > wikipedia [ > http://en.wikipedia.org/wiki/Lenstra_elliptic_curve_factorization]. I > think that this code is not optimised and posting for further > improvement. Feel free to comment and if you have any link regarding > Elliptic curve prime factorisation , kindly post it. Thank you
I don't think you can optimize it further in pure Python, although it is probably a good candidate for something like Cython, Pyrex or Shedskin. I think the code can be optimized for easier reading by putting single spaces around operators, following commas, etc. I find your style difficult to read. It could do with a docstring explaining what it does and how to use it, and some doctests. But other than that, it looks good. Have you considered putting it up on the ActiveState Python cookbook? -- Steven -- http://mail.python.org/mailman/listinfo/python-list