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 7170919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:18:30+00:00 2026-05-28T15:18:30+00:00

Ok, I have read several discussions regarding the differences between JIT and non-JIT enabled

  • 0

Ok, I have read several discussions regarding the differences between JIT and non-JIT enabled interpreters, and why JIT usually boosts performance.

However, my question is:

Ultimately, doesn’t a non-JIT enabled interpreter have to turn bytecode (line by line) into machine/native code to be executed, just like a JIT compiler will do? I’ve seen posts and textbooks that say it does, and posts that say it does not. The latter argument is that the interpreter/JVM executes this bytecode directly with no interaction with machine/native code.

If non-JIT interpreters do turn each line into machine code, it seems that the primary benefits of JIT are…

  1. The intelligence of caching either all (normal JIT) or frequently encountered (hotspot/adaptive optimization) parts of the bytecode so that the machine code compilation step is not needed every time.

  2. Any optimization JIT compilers can perform in translating bytecode into machine code.

Is that accurate? There seems to be little difference (other than possible optimization, or JITting blocks vs line by line maybe) between the translation of bytecode to machine code via non-JIT and JIT enabled interpreters.

Thanks in advance.

  • 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-28T15:18:31+00:00Added an answer on May 28, 2026 at 3:18 pm

    A non-JIT interpreter doesn’t convert bytecode to machine code. You can imagine the workings of a non-JIT bytecode interpreter something like this (I’ll use a Java-like pseudocode):

    int[] bytecodes = { ... };
    int   ip        = 0; // instruction pointer
    while(true) {
      int code = bytecodes[ip];
      switch(code) {
        case 0;
          // do something
          ip += 1; break;
        case 1:
          // do something else
          ip += 1; break;
        // and so on...
      }
    }
    

    So for every bytecode executed, the interpreter has to retrieve the code, switch on its value to decide what to do, and increment its “instruction pointer” before going to the next iteration.

    With a JIT, all that overhead would be reduced to nothing. It would just take the contents of the appropriate switch branches (the parts that say “// do something”), string them together in memory, and execute a jump to the beginning of the first one. No software “instruction pointer” would be required — only the CPU’s hardware instruction pointer. No retrieving of bytecodes from memory and switching on their values either.

    Writing a virtual machine is not difficult (if it doesn’t have to be extremely high performance), and can be an interesting exercise. I did one once for an embedded project where the program code had to be very compact.

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

Sidebar

Related Questions

I have have read several entries regarding dropping several functional functions from future python,
I have read several articles regarding templates for web site content. They all seem
I have read several documentations about building custom ErrorHandler (by inheriting from IErrorHandler). Unfortunately,
I have read several post on both matters but I haven't seen anyone comparing
I have read through several reviews on Amazon and some books seem outdated. I
I have read in several places that it's possible to share the objects directory
I'm quite confused about several books in .NET that I have read. Would someone
I have read this post about how to test private methods. I usually do
I have read several articles/questions/forums discussing the best auto-complete plugin for jQuery. After trying
I have read several tutorials, but I just can't this to work. My apache

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.