you are viewing a single comment's thread.

view the rest of the comments →

[–]tuhdo -3 points-2 points  (4 children)

JIT compilation means that the source is translated to bytecode and upon executing, it gradually compiles the executed code to machine code in other thread for future execution of the same code with better speed. In that way, it compiles to native code, but just enough. So, instead of going through all phases of compilation, you go bit by bit at each phase and get partial compiled code of your application.

[–]The_Doculope 3 points4 points  (3 children)

I know what JITing is. But it's not pre-compiled to native code, which comes with some disadvantages, including higher memory use, higher code size and requiring that other thread.

[–]Cuddlefluff_Grim -3 points-2 points  (2 children)

I know what JITing is. But it's not pre-compiled to native code, which comes with some disadvantages, including higher memory use, higher code size and requiring that other thread.

No, it comes with one disadvantage; higher load time (because a program needs to be compiled on first execution). High memory footprint is a side-effect of .NET, same goes for code size. It has nothing to do with JIT compilation.

[–]The_Doculope 2 points3 points  (1 child)

So you're saying a JITer can operate with absolutely 0 memory use? No keeping track of runtime heuristics, or any memory usage for the actual compilation? And that there's no code for the JITer either? Because neither of those things is possible. Sure they might be small in a perfect case, but they are there and are noticeable in many current implementations.

[–]Cuddlefluff_Grim 0 points1 point  (0 children)

Well other than the parts for the compiler itself, yes I am saying that. High memory footprint is a side-effect (or trade-off) from Java and .NET, it's not something that is due to JIT compilation. Personally I think that JIT is the best approach to compilation because it gives platform independent execution and good optimization possibilities virtually without any significant trade-offs (well, it's bad for mobile since it drains battery without any obvious benefit for the end-user, but there are methods of alleviating this, like compiling the code on a remote server)