The JIT (just-in-time compilation) is a method to improve the run-time performance of computer programs based on byte code (virtual machine code).

learn more… | top users | synonyms

4
votes
1answer
112 views

Do java .class files have a lexer/parser?

I've been learning ANTLR, by writing my own (extremely simple!) programming language It made me curious about how the lexer/parser/AST is implemented for java. Obviously there is a grammar for .java ...
0
votes
0answers
50 views

Does loop unrolling on a JIT platfrom (.NET or JVM) provide any benefit

I know in C, you can use loop unrolling (unwinding) to help reduce branching in your code but at the expense of program size. That seems to work when you compile to a target machine, however, does it ...
2
votes
1answer
64 views

How do hybrid interpreter-JIT compilers work?

Chrome's V8 compiler, the Java HotSpot compiler, and many more have multiple tiers of interpretation and compilation. A function starts off as interpreted in HotSpot and then, if it is run often ...
0
votes
0answers
58 views

Android runtime - does ART miss optimization opportunities over Dalvik?

Is ART a strict improvement over Dalvik, or there are optimizations that an ahead-of-time compiler will miss compared to JIT, but Google decide they don't matter in practice? For example, with JIT, ...
1
vote
1answer
304 views

Why is Android Runtime's AOT compilation more performant than Dalvik's JIT? [closed]

With Android 5.0, Google has introduced the Android Runtime, or ART. ART "brings improvements in performance, garbage collection, applications debugging and profiling." However, it also replaces ...
2
votes
3answers
152 views

Which components/phases of a JIT compiler are different from a traditional ahead of time compiler?

Besides a faster register allocation algorithm and some trade-off in control and data-flow analysis for optimization purposes, which components/phases of a JIT compiler are different from a ...
0
votes
2answers
239 views

How does the Common Language Runtime improve performance? [duplicate]

I read on the wikipedia article for Common Language Runtime that one of the benefits that the runtime provides is "Performance improvements". Executing managed code (Or bytecode) must surely always ...
10
votes
1answer
203 views

Machine code JITs and the Execution Disable bit

How is runtime-generated machine-code (such as the output of a JIT), actually executed by the CPU if the CPU/OS has an Execution Disable bit? As far as I know, many modern processors and Operating ...
10
votes
1answer
1k views

Understanding the differences: traditional interpreter, JIT compiler, JIT interpreter and AOT compiler

I'm trying to understand the differences between a traditional interpreter, a JIT compiler, a JIT interpreter and an AOT compiler. An interpreter is just a machine (virtual or physical) that executes ...
2
votes
0answers
67 views

How can I find the start of a native method?

For a hobby project, I'm writing an x86 GC and JIT. For the GC, I need to maintain information about the stack layout (it's a precise GC), for which I need to be able to find out which method the IP ...
8
votes
1answer
298 views

What's the relationship between meta-circular interpreters, virtual machines and increased performance?

I've read about meta-circular interpreters on the web (including SICP) and I've looked into the code of some implementations (such as PyPy and Narcissus). I've read quite a bit about two languages ...
-1
votes
1answer
126 views

Does Jar file shrinker affect performance [closed]

I've heard ProGuard's Jar shrinker affects the performance of you application. Is this true? And if so just how much slower does the Jar go shrinked compared to unshrinked?
3
votes
1answer
75 views

Expensive AOT Optimizations

I've seen it stated several times that AOT can run some more expensive optimizations that take too long to be used by a JIT. But I've never seen it stated what exactly these optimizations are. So I'm ...
7
votes
2answers
600 views

Does current JIT optimize generated machine codes for branch prediction based on runtime statistics?

Some JVMs would compile Java byte code into native machine code. We know that there are lots of optimizations we could apply for that. Recently, I also learn that a branch operation may block the CPU ...
91
votes
11answers
26k views

What backs up the claim that C++ can be faster than a JVM or CLR with JIT? [closed]

A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM ...
7
votes
5answers
2k views

Why is it called Just In Time?

I know what the JIT compiler is but how about why is it called that, it obviously catches exceptions Just in Time, but how and why should it be called this? Sorry if this sounds a bit vague.
4
votes
4answers
692 views

Java/C# - When should AOT be considered if reverse engineering is a concern?

Long and short is really in the question title. For a language which compiles to an intermediate language like MSIL or Java byte-code, if there's concern about something like reverse engineering or ...
14
votes
4answers
13k views

Why after each restart, my local .NET sites take time to load for the first time? [closed]

I'm developing sites based on .NET platform. I usually deploy these sites on my local IIS, so that I can test them and see their functionality before going live. However, each time I restart windows, ...
7
votes
1answer
1k views

Pros and cons of JIT and AOT

In which respects "Just In Time" compilation is better than "Ahead Of Time" compilation? And vice versa. Is AOT same as direct native compilation?
17
votes
5answers
9k views

JIT compiler for C, C++, and the likes

Is there any just-in-time compiler out there for compiled languages, such as C and C++? (The first names that come to mind are Clang and LLVM! But I don't think they currently support it.) ...
7
votes
13answers
4k views

Would a statically typed alternative to JavaScript on webpages be practical?

Preference for dynamic and static typing is largely a matter of taste, and different people find them more or less suitable in different situations. My question is, would it be technically possible ...
10
votes
2answers
1k views

Compiler optimization examples [closed]

I'd like to see (good) examples of optimizations performed by compilers (static and JIT). Why? To learn what we don't have to optimize ourselves (often leading to better code) To be amazed