Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌
TANMAY the way you explain everything with diagrams and flowcharts is just exceptional and amazing , the topic has been made so simple after watching this , Thanks for making these videos and wish you all the best for the future .
Most welcome buddy. This was really such a lovely, positive and motivating comment. 😊 Really means a lot & thank you for the wishes. I would just request you to please share our channel videos with your friends & ask them to Subscribe too. That's the biggest help & support you can provide 😊
The JIT doesn't avoid compiling the repeated lines of code. It replaces the already compiled code in place of the repeated lines instead of compiling the same code again and again.
I would guess that what is presented in the video is just a simplification, and that the JIT would detect runtime redundancies that the compiler is not able to detect remove without potentially messing up the program.
After watching this video , I got clarity on the purpose of JIT compiler. Great work ! Btw how are you making these videos , especially to create content in single page. Videoscribe or any other softwares used?
According to what he mentioned in the video, JIT compiler just transfers the non redundant code to the interpreter but if the JIT compiler is used before the compiler in the compile stage, if any error occurs in the program especially in the redundant code lines, the compiler throws an error only for one redundant line as it can't see the remaining lines, it's quite a problem if those redundant lines are at random positions.......for example: out of 1000 code lines there are 300 redundant lines JIT passes 701 code lines so compiler throws error only for that one redundant line( in case of error with redundant lines) so it's tedious to search for the rest. In case if it's used after compiler, I guess result remains the same, so it doesn't makes any difference.
This is a great video! But I do have a question. Why do things like duplicated lines of code have to be caught by the JIT compiler? Can't the first compiler catch those?
as I understand from the video they are different, the first compiler act on java code it checks syntax errors and code duplication for example before converting it to bytecode. the second compiler act on bytecode (ABC.class) its optimize the bytecode to make the program run faster (like in the video it removes the duplication of set the same value to the same variable) before sending it to the interpreter to convert it to native machine code to run on CPU
@@OudoMohy Are you saying that JIT is part of the main compiler? From what I understand, the main compiler compiles the java code to bytecode, then the bytecode is given to the users, then the JIT compiles and runs the program on the user's computer
Thank you for the compliments Bhakti, I am glad that I could make this JIT topic easy for you. please do share the videos with your friends too. Thats the biggest help and support 😇
Really good explanation, but even after watching your video I had some doubts, resovling them I came across the fact that ; when the jvm uses the jit compilation the interpretation process is completely skipped. The jit produces the native machine code directly, which is ready to be executed.
Thanks bro 🤟 well to be honest I never ever opened any book for studying and programming language. Everything you'll get on Google. You can refer javatpoint website. 🤟
In one of the interview of FAANG companies, I was being asked very deep internal working of all these steps. Is there any book that I can read for such details.
The .class file itself is a bytecode . If we assume the byte code is executed line by line by Interpreter or the JIT compiler what is the format of the output that is being generated?
Thank you so much buddy, I am glad to hear this from you. Please do share the videos with your friends & Definitely SUBSCRIBE. Thats the biggest help & support 😇✌
Hi Mr. Simple, i love your explanation, but i don't understand, can we choose to use JIT or not? and will jit run only if there is a code update ? and if there is no code update then the JIT will not run and will go directly to the interpreter ?.. please sir this make me so confused
so JDK compiles the code and converts it into bytecode. The bytecode is further loaded, verified and executed in JVM also JVM provides a runtime environment. so what does JRE do ???
Thats really great to know buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
You're welcome Bhawna. Glad to hear your positive feedback. Please do share the video with your friends and contacts too. That will be super helpful 😋😇