General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Ty Ty
ByteByteGo
comments
Comments by "Ty Ty" (@TyTy-gm8yb) on "Python Vs C++ Vs Java!" video.
The information about the Java isn't accurate. The Java code is compiled in Bytecode and then at runtime, the code is interpreted by the JVM(Java Virtual Machine) into Assembly Language. Java doesn't have an assembler into the JVM in order to compile into Assembly Language. The Java code is ran by interpreting the Byte Code into Assembly Language at runtime. Java is significantly faster than interpreted languages because the code is lowered into a lower level language which in this case is Bytecode, which in turn is interpreted by the JVM into Assembly language at runtime. Because the JVM is interpreting a lower level language at runtime, the code to be executed at runtime is significantly faster than a purely interpreted language like Javascript, which converts the code at runtime in machine language directly.
1
@theshermantanker7043 The native version of Java is using JVM. The purpose of many JIT languages is to both compile and interpret the language. They compile the code into bytecode, then they are interpreting the bytecode at runtime into machine language. By lowering the code into a lower level language like bytecode, which is close to Assembly Language (The human readable version of Machine Code, which is practically sets of cpu instruction that instead of being written in 0 and 1 are written in a "human readable" language)the interpreter has less work to do, so in turn the interpretation operation is faster.
1
@theshermantanker7043 Other non standard versions of Java JIT Compilers compile into Machine Language at runtime. C# is a language which is doing that by default. It is firstly compiling the language into Bytecode, than at runtime is compiling into the most optimal way the Bytecode into machine language.
1
@MikeSwanberg The only programming language that is compiling the code in the way described with its default compiler is C#
1
@MikeSwanberg C# is JIT compiled. When C# is compiled, it compiles the code into CIL (Common Intermediate Language) , which is similar to bytecode, inside an executable file that contains the C# runtime environment. When the program is ran, the CLR (Common Language Runtime) will take the CIL code and compile it into Machine Language piece by piece on the fly, in accordance with which method was called. Java on the other hand, will compile the code into Bytecode. When the Java program is ran, the JRE (Java Runtime Environment) will take the Bytecode and interpret it into Machine Language. These is how the standard versions of these languages and their runtime environments compile and operate.
1
@MikeSwanberg C# is like a combination between C++ and Java. In C# you can allocate memory manually and do pointer based operations like in C++, but you also have a Grabage Collector like Java has. C# compiles the code into a version of an intermediate language like Java, then at runtime it compiles the intermediate language code into machine language, having the same net result as C++. Even C# mean C++++
1
@MikeSwanberg On the other hand, Java is interpreting the Java code into Bytecode. By doing this the Java code is lowered into a Language that is very close to machine language, thus making the interpretation of the Bytecode language have a minimal performance impact, and thus resulting into a performance similar to AOT (Ahead Of Time) compiled languages.
1
@MikeSwanberg It is both, it is unique and also similar. Some characteristics are similar, some are unique, depends on the perspective you chose.
1
@MikeSwanberg I just gave the operational characteristics of these languages and their runtime and is up to everyone to decide which is what, not me.
1