• 0 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: July 24th, 2023

help-circle

  • I originally had words about ahead of time compilers like GraalVM but got tired of looking at my own wall of text so I trimmed it down and left compiler to mean ahead of time compulers, which I see caused confusion, you’re right on those points.

    I know the JVM hardware exists also, but, it’s specialty hardware even at the enterprise level. You could technically make an ASIC that executes QBASIC at hardware but I’m not sure I’d believe that makes it a compiled language since it would be neither wide spread nor the original use case for it. That’s kind of a philosophical argument though

    I think my use of compilers in interpretation may also be confusing, interpreters have an execution step, which at some point translates to a machine representation of your code. It’s referred to as execution, but, it feels a lot like a compile+execute step


  • I think you’re missing that all interpreters have a compilation step that produces machine code, that’s a requirement to produce programs.

    Java’s JIT compiler is the final compilation step of Java’s interpreting path running in a separate thread that turns the intermediate language to machine code. To be very clear though, the output of the standard javac compiler is not machine code that a processor understands. This is what makes Java not a compiled language. It depends on additional processes at runtime to turn the code you wrote into something a processor understands.

    On the performance front, well written Java is fast enough as long as you have sufficient resources for the overhead of JVM and as long as you don’t have strict latency requirements. That makes it good for a pretty wide variety of computing tasks, but, also not a good choice for a lot of others.