Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 929481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:10:45+00:00 2026-05-15T20:10:45+00:00

Possible Duplicate: JIT compiler vs offline compilers So until a few minutes ago I

  • 0

Possible Duplicate:
JIT compiler vs offline compilers

So until a few minutes ago I didn’t really understand what the difference between a JIT compiler and an interpreter is. Browsing through SO, I found the answer, which brought up the question in the title. As far as I’ve found, JIT compilers have the benefit of being able to use the specific processor it’s running on and can thus make better optimized programs. Could somebody please give me a comparison of the pros and cons of each?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:10:45+00:00Added an answer on May 15, 2026 at 8:10 pm

    Interpreter, JIT Compiler and “Offline” Compiler

    Difference between a JIT compiler and an
    interpreter

    To keep it simple, let’s just say that an interpreter will run the bytecode (intermediate code/language). When the VM/interpreter decides it is better to do so, the JIT compilation mechanism will translate that same bytecode into native code targetted for the hardware in question, with focus on the type of optimizations requested.

    So basically a JIT might produce a
    faster executable but take way longer
    to compile?

    I think what you are missing is that the JIT compilation happens at runtime and not compile time (unlike an “offline” compiler)

    JIT Compilation has overhead

    Compiling code is not free, takes time also. If it invests time on compiling it and then goes to run it only a few times, it might not have made a good trade. So the VM still has to decide what to define as a “hot spot” and JIT-compile it.

    Allow me to give examples on the Java virtual machine (JVM):

    The JVM can take switches with which you can define the threshold after which the code will be JIT compiled. -XX:CompileThreshold=10000

    To illustrate the cost of the JIT compilation time, suppose you set that threshold to 20, and have a piece of code that needs to run 21 times. What happens is after it runs 20 times, the VM will now invest some time into JIT compiling it. Now you have native code from the JIT compilation, but it will only run for one more time (the 21), which may not have brought any performance boost to make up for the JIT process.

    I hope this illustrates it.

    Here is a JVM switch that shows the time spent on JIT compilation -XX:-CITime “Prints time spent in JIT Compiler”

    Side Note: I don’t think it’s a “big deal”, just something I wanted to point out since you brought up the question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Difference between Convert.tostring() and .tostring() Hi Carrying on from this question What
Possible Duplicate: what is the difference between #include <filename> and #include “filename” Why do
Possible Duplicate: Should I learn C before learning C++? As a professional (Java) programmer
Possible Duplicate: How do you give a C# Auto-Property a default value? Hi all:
Possible Duplicate: How to detect if JavaScript is disabled? I have a website which
Possible Duplicate: How to copy part of an array to another array in C#
Possible Duplicate: Why is my return type meaningless? Hi, I'm confused about a particular
Possible Duplicate: John Carmack’s Unusual Fast Inverse Square Root (Quake III) I came across
Possible Duplicate: or is not valid C++ : why does this code compile ?
Possible Duplicate: Overloading += in c++ Do I need to overload the += operator

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.