On Jan 26, 2009, at 5:09 AM, Magnus Lie Hetland wrote: > On Jan 26, 2009, at 12:48, Michael Abshoff wrote: > >> I do not know if Jython is faster than CPython, but why would you >> want to use it other than the embedding advantage? I am curious here >> since I never had more than superficial contact with Jython. > > Basically, it would be to use code that's already written in Java. The > Jython part wouldn't be expected to be fast :-)
I think you can already do this with Jython, though it's not compiled ahead of time. > As for what Stefan said aboud losing cdef-stuff -- I'll take his word > for the coupling between Cython and C, but the syntax would be just as > useful for type declarations for Java (but with a completely different > translator then, I guess :-) You wouldn't lose all the cdef stuff, it could still be useful to type things like floats and ints, and perhaps specialized java types. However, you wouldn't have pointers, and a huge benefit from Cython is being able to link to existing C/C++ libraries. There is a lot of C/CPython specific stuff in Cython as well, stuff like refcounting and virtual function pointer tables are not needed in a JVM context. In short, I think it could be done, but may be a lot easier to adapt Jython to do what you want (if it doesn't already) than Cython. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
