On Jan 23, 10:09 am, ahmet alper parker <aapar...@gmail.com> wrote: > Is there someone who has > experience with compiling a java code to native code on an operating > system?
the standard java virtual machine by sun already compiles java bytecode to native machine code. this is called "hotspot" compiler and picks those parts at runtime, that are very often used and translates them. This goes even so far, that long running loops are replaced while they are still running - called "on stack replacement". If you have a big machine (multicore, >= 2 gb ram) then you can run java in the "server" configuration for additional optimizations. http://java.sun.com/javase/technologies/hotspot/index.jsp http://java.sun.com/javase/6/docs/technotes/guides/vm/server-class.html also notice, that this approach goes some steps further in recent java versions (6 and soon 7), where the sourcecode is analyzed and rewritten to improve performance (things like dynamic inlining, lock elusion, escape analysis ... http://java.sun.com/javase/technologies/hotspot/publications/ ) http://java.sun.com/performance/reference/whitepapers/6_performance.html >From my experience, all other options are less stable and tested. Of course, you still have all checks (i.e. there is nothing like in cython where you disable checks) and the virtual machine is also still used (but therefore you get garbage collection with a variaty of different collectors and options) For everything else you should consider JNI (that's the mechanism to call native C code and how all basic java language features are implemented) h --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---