Skip to main content
Filter by
Sorted by
Tagged with
912 votes
10 answers
255k views

The following Java program takes on average between 0.50 secs and 0.55 secs to run: public static void main(String[] args) { long startTime = System.nanoTime(); int n = 0; for (int i = 0; ...
Stefan's user avatar
  • 5,102
652 votes
18 answers
310k views

What does a JIT compiler specifically do as opposed to a non-JIT compiler? Can someone give a succinct and easy to understand description?
Michiel Borkent's user avatar
413 votes
3 answers
9k views

The following code gives different output when running the release inside Visual Studio, and running the release outside Visual Studio. I'm using Visual Studio 2008 and targeting .NET 3.5. I've also ...
Philip Welch's user avatar
  • 4,508
103 votes
5 answers
53k views

I've become a bit confused about the details of how the JIT compiler works. I know that C# compiles down to IL. The first time it is run it is JIT'd. Does this involve it getting translated into ...
Steve's user avatar
  • 12.2k
97 votes
7 answers
26k views

Is there some way to see the native code produces by the JIT in a JVM?
alsor.net's user avatar
  • 1,142
92 votes
6 answers
34k views

I've heard this term used, but I'm not entirely sure what it means, so: What DOES it mean and what DOESN'T it mean? What are some examples of what IS and ISN'T microbenchmarking? What are the dangers ...
polygenelubricants's user avatar
89 votes
3 answers
54k views

Using java -XX:+PrintFlagsFinal I found the TieredCompilation flag, and I read about it a bit online. Yet, I still don't know exactly what happens when setting it to false. I know that the ...
Markus Weninger's user avatar
86 votes
9 answers
38k views

I've been thinking about it lately, and it seems to me that most advantages given to JIT compilation should more or less be attributed to the intermediate format instead, and that jitting in itself is ...
zneak's user avatar
  • 139k
84 votes
4 answers
7k views

I'm toying with the idea of writing a JIT compiler and am just wondering if it is even theoretically possible to write the whole thing in managed code. In particular, once you've generated assembler ...
J D's user avatar
  • 48.8k
65 votes
1 answer
26k views

EDIT: unfortunately LuaJIT was taken out of the comparison in the link below. This comparison of programming languages shows that LuaJIT has an over tenfold improvement over the normal Lua ...
Mihai's user avatar
  • 1,311
64 votes
1 answer
30k views

I've just found that PyTorch docs expose something that is called Torch Scripts. However, I do not know: When they should be used? How they should be used? What are their benefits?
ndrwnaguib's user avatar
  • 6,246
63 votes
8 answers
35k views

When I run composer --version in the macOS terminal, I get the following errors. PHP Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/...
sheraz m's user avatar
  • 666
61 votes
11 answers
97k views

We are making some kNN and SVD implementations in Python. Others picked Java. Our execution times are very different. I used cProfile to see where I make mistakes but everything is quite fine ...
Baskaya's user avatar
  • 7,891
58 votes
8 answers
38k views

What are the differences between a Just-in-Time-Compiler and an Interpreter, and are there differences between the .NET and the Java JIT compiler?
Rookian's user avatar
  • 20.7k
56 votes
10 answers
27k views

I have heard that Java must use a JIT to be fast. This makes perfect sense when comparing to interpretation, but why can't someone make an ahead-of-time compiler that generates fast Java code? I know ...
Adam Goode's user avatar
  • 7,488
55 votes
7 answers
37k views

What is the difference between the JIT compiler and CLR? If you compile your code to il and CLR runs that code then what is the JIT doing? How has JIT compilation changed with the addition of generics ...
Ted Smith's user avatar
  • 9,631
50 votes
5 answers
9k views

Outside of the ensuring that they cannot be changed (to the tune of a compiler error), does the JIT make any optimisations for const locals? Eg. public static int Main(string[] args) { const int ...
Richard Szalay's user avatar
49 votes
1 answer
2k views

While writing an answer to another question, I noticed a strange border case for JIT optimization. The following program is not a "Microbenchmark" and not intended to reliably measure an execution ...
Marco13's user avatar
  • 54.8k
46 votes
11 answers
10k views

Are there scenarios where JIT compiler is faster than other compilers like C++? Do you think in the future JIT compiler will just see minor optimizations, features but follow a similar performance, ...
Joan Venge's user avatar
  • 334k
46 votes
2 answers
19k views

I was thinking that JIT compilers will eventually beat AOT compilers in terms of the performance of the compiled code, due to the inherent advantage of JIT (can use information available only at ...
Enno Shioji's user avatar
  • 26.9k
45 votes
7 answers
3k views

When I read about the performance of JITted languages like C# or Java, authors usually say that they should/could theoretically outperform many native-compiled applications. The theory being that ...
dewald's user avatar
  • 5,369
44 votes
5 answers
3k views

Why does commenting out the first two lines of this for loop and uncommenting the third result in a 42% speedup? int count = 0; for (uint i = 0; i < 1000000000; ++i) { var isMultipleOf16 = i % ...
Edward Brey's user avatar
  • 42.1k
41 votes
8 answers
13k views

I'd like to write a very small proof-of-concept JIT compiler for a toy language processor I've written (purely academic), but I'm having some trouble in the middle-altitudes of design. Conceptually, ...
Chris Tonkinson's user avatar
39 votes
5 answers
2k views

There's that (relatively) well known Perl axiom, "Only perl can parse Perl." I'm wondering, will that remain true for Perl 6? Expanding the discussion... I thought of this question given the ...
Mark Canlas's user avatar
  • 9,663
38 votes
2 answers
24k views

I'm using C#.NET for a web application. I've read that JIT compilation happens at run-time, which means(correct me if I'm wrong) that the compilation will happen when the request hits IIS. Another ...
chaudharyp's user avatar
  • 3,624

1
2 3 4 5
41