Python Vs C++ Vs Java!

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 มิ.ย. 2024
  • Get a Free System Design PDF with 158 pages by subscribing to our weekly newsletter: bytebytego.ck.page/subscribe
    Animation tools: Adobe Illustrator and After Effects.
    Checkout our bestselling System Design Interview books:
    Volume 1: amzn.to/3Ou7gkd
    Volume 2: amzn.to/3HqGozy
    The digital version of System Design Interview books: bit.ly/3mlDSk9
    ABOUT US:
    Covering topics and trends in large-scale system design, from the authors of the best-selling System Design Interview series.

ความคิดเห็น • 290

  • @ethanyalejaffe5234
    @ethanyalejaffe5234 7 หลายเดือนก่อน +210

    You didn't mention Python bytecode at all! It's a myth that python isn't compiled. It is compiled to bytecode, which is an intermediate which gets interpreted. The Python interpreter isn't looking at your human readable Python code line by line.

    • @ByteByteGo
      @ByteByteGo  7 หลายเดือนก่อน +82

      Good point. We should have briefly mentioned Python bytecode in the vid, probably towards the end. Thanks for pointing that out - it's an important part of how Python works under the hood.

    • @ShibasisPatnaik
      @ShibasisPatnaik 7 หลายเดือนก่อน +10

      @@ByteByteGo Very grateful for your high quality videos. But this one has an error. It is not at all clear that python has a bytecode and a vm from this video.

    • @MikeSwanberg
      @MikeSwanberg 6 หลายเดือนก่อน +5

      I was thinking the same thing... I also had an issue with the video saying "the JVM has a just-in-time compiler" and then in the next breath saying "Java can run on any device without recompilation." So is the JVM "compiling" or not? Further, the idea that a "compiled" language runs faster than an interpreted one is generally true, but not specifically true; the biggest slowdown to some modern languages is due to them not being strongly typed. Python suffers from this (to a degree), as does Perl and many others. But we can see that Python, even though it is JIT compiled (same with Perl), that does not speed the execution to that of C/C++ or even Java. All in all, a decent video here, just not super accurate for the pedants among us.

    • @theshermantanker7043
      @theshermantanker7043 6 หลายเดือนก่อน +4

      ​@@MikeSwanberg Python is NOT JIT capable, at least not yet

    • @MikeSwanberg
      @MikeSwanberg 6 หลายเดือนก่อน

      @@theshermantanker7043 Okay, so what do YOU call the process of compiling to bytecode on-the-fly at run-time? I call that compiling that's just in time for execution... or JIT.

  • @kirillgimranov4943
    @kirillgimranov4943 7 หลายเดือนก่อน +93

    Cpython uses compiling into bytecode too and it uses its own machine code to run in a operating system

  • @juancarlospizarromendez3954
    @juancarlospizarromendez3954 6 หลายเดือนก่อน +26

    There are some tools for max speed:
    1. Python world: Python + PyPy + GraalVM Python
    2. Java world: GraalVM vs JVM (stack-based VM) vs Dalvik (register-based VM)

  • @jamesT008
    @jamesT008 7 หลายเดือนก่อน +15

    Precise n to the point that what make me watch ur vdos always. No useless bla bla. Thanks

  • @Mtnsunshine
    @Mtnsunshine 6 หลายเดือนก่อน +10

    Thank you for explaining this so succinctly and understandably. I am a rookie with it all, but I do like to know the basics so I can understand more complex ideas. Much appreciated.

  • @saulorocha3755
    @saulorocha3755 5 หลายเดือนก่อน +3

    Always a clear explanation (with great animation), thank you!

  • @gus473
    @gus473 7 หลายเดือนก่อน +17

    Thanks Sahn, your explainers and animations are the best in the business! 😎✌️

  • @NK-iw6rq
    @NK-iw6rq 7 หลายเดือนก่อน +2

    Thank you Mr ByteByte ! Your content is amazing !!!!

  • @user-lt9ey6gw3x
    @user-lt9ey6gw3x 4 หลายเดือนก่อน +3

    Java Compiler compile Java codes to JVM bytecodes. Them JVM translates bytecode instructions to native instructions. So, this make Java faster then interpreted languages.
    Additionally, JIT Compiler compiles some/all JVM bytecodes to native machine codes.

  • @trilecao9014
    @trilecao9014 7 หลายเดือนก่อน +5

    Thanks. It's very helpful ❤
    Your explanation and animation are good also.

    • @osogrande4999
      @osogrande4999 6 หลายเดือนก่อน

      And also wrong and nonsense.

  • @sunday-thequant8477
    @sunday-thequant8477 2 หลายเดือนก่อน

    Bro i really love your channel, im learning a lot!

  • @drewrodrigues
    @drewrodrigues 6 หลายเดือนก่อน +11

    Awesome video! Side note: you used a `C#` logo at 4:22 instead of `C++`.

  • @renatoamaral2029
    @renatoamaral2029 3 หลายเดือนก่อน +1

    Excellent and concise explanations! 👍👍👍

  • @aiviet5497
    @aiviet5497 7 หลายเดือนก่อน +4

    I have a question: Which do you use to make the animation for your video?

  • @chocolatepun
    @chocolatepun 6 หลายเดือนก่อน +1

    this video is very useful!! Thank you!!

  • @blompinne
    @blompinne 7 หลายเดือนก่อน +160

    At the end the C# logo is used instead of C++.

    • @The-Cat
      @The-Cat 7 หลายเดือนก่อน +7

      I noticed that too 😅 good eye my friend!

    • @Kane0123
      @Kane0123 7 หลายเดือนก่อน

      The lords language!

    • @queenofpain6483
      @queenofpain6483 7 หลายเดือนก่อน +13

      that stands for C++++

    • @Chemnitz11
      @Chemnitz11 7 หลายเดือนก่อน +6

      Freudian slip?

    • @doublekamui
      @doublekamui 6 หลายเดือนก่อน +3

      in very high performance machine? no. f35 fighter jet system is created using c++.

  • @AleksandarT10
    @AleksandarT10 7 หลายเดือนก่อน +8

    Probably covering Java GraalVM where Java is compiled for a specific CPU architecture would have been good as part of this video. Nevertheless great video! That can be in another one!

    • @kostiapereguda
      @kostiapereguda 7 หลายเดือนก่อน

      What about Jython?) Python frontend that gets compiled to JVM bytecode. Combinations are endless, covering everything will take ages

  • @vick_onrails
    @vick_onrails 7 หลายเดือนก่อน +1

    Great and informative video. Thanks for sharing

  • @chrishinds7896
    @chrishinds7896 9 วันที่ผ่านมา

    C++ compiler actually produces intermediate code with must then be linked by a linker that links and resolves the intermediate code to the target operating system. On Windows an an Exe or Linux other Unix based OSs the link step will generate a .so files

  • @HolyRamanRajya
    @HolyRamanRajya 7 หลายเดือนก่อน +14

    4:16 Was C# intentional or a typo? If intentional, what is the difference between C# and Java on a compiler level.

    • @bity-bite
      @bity-bite 7 หลายเดือนก่อน +1

      What do you mean by "compiler level"?

    • @darkfllame
      @darkfllame 3 หลายเดือนก่อน +1

      c# is basically microsoft java, but slightt faster and more memory efficient. And in the end, what's the matter, code in the language you love (or hate if you do javascript)

  • @afrosoul4eva
    @afrosoul4eva 7 หลายเดือนก่อน

    Thank you for this explanation

  • @PrinceKumar-hh6yn
    @PrinceKumar-hh6yn 2 หลายเดือนก่อน

    Good for taking overview

  • @andyblum9850
    @andyblum9850 2 หลายเดือนก่อน

    Excelente vídeo, eu do Brasil agradeço muito!!!!!

  • @fu2201
    @fu2201 6 หลายเดือนก่อน

    Well done, thanks

  • @SuvobrotoPal
    @SuvobrotoPal 7 หลายเดือนก่อน

    Very Informative Video, Thank you very much, From Kolkata City, India
    🙏🙏

  • @py9849
    @py9849 3 หลายเดือนก่อน +1

    Perhaps the Java approach is unique now, but was developed by Niklaus Wirth, a Swiss computer scientist, working at Berkeley in the 1970s.
    He designed a p-machine generating p-code. The first application, it seems to me, was the creation of the Pascal UCSD language

  • @happyjulien6275
    @happyjulien6275 2 หลายเดือนก่อน

    The most useful video of this beginning year

  • @systemBuilder
    @systemBuilder หลายเดือนก่อน

    CPython is a JIT compiler/interpreter.

  • @butthry-tech
    @butthry-tech 6 หลายเดือนก่อน

    Thanks for sharing

  • @HRudolf88
    @HRudolf88 7 หลายเดือนก่อน +14

    I would have mentioned that this is why python modules use C bindings for performance critical calculations.

    • @miraculixxs
      @miraculixxs 7 หลายเดือนก่อน

      @@potatoandpippen you are so nice to people, a real role model. Thank you 🙏

    • @miraculixxs
      @miraculixxs 7 หลายเดือนก่อน

      Compiled languages also use C bindings (or some other convention) to call library code. No difference there.

  • @pulanski
    @pulanski 7 หลายเดือนก่อน +1

    python description isn't the full picture. python's actually compiled lol (just into bytecode for the interpreter)

  • @BohonChina
    @BohonChina 7 หลายเดือนก่อน +10

    This is a old comparison, Java is actually changing into native binary like graalvm to fit the cloud native requirements, moreover, wasm wasi is another alternatives for bytecode execution. Python actually is not always a intepreted language, Pypy can work like jvm just-in-time, cython for python performance is actually c compiled module for performance.

    • @DemPilafian
      @DemPilafian 7 หลายเดือนก่อน +5

      This is a sub-5 minute video.

  • @ZenvilleErasmus
    @ZenvilleErasmus 6 หลายเดือนก่อน

    This is top quality content!

  • @fullStackInKannada
    @fullStackInKannada 7 หลายเดือนก่อน

    Very nice I really liked it :)

  • @igorshingelevich7627
    @igorshingelevich7627 7 หลายเดือนก่อน +1

    Such a clear explanation ❤

    • @miraculixxs
      @miraculixxs 7 หลายเดือนก่อน +1

      Yes, unfortunately it is misleading in regards to Python. See comments

  • @xx_Ashura_xx
    @xx_Ashura_xx 4 หลายเดือนก่อน

    all (major) interpeted languages compile to their bytecode because running it directly from source code wouldnt be in effecient. however python is not compiled in the sense that java and c# are where they get JIT compiled in the end from the bytecode where python just runs the interpreted code. javascript i believe dynamically jits its code if decided by the v8 engine and such.

  • @dudeabideth4428
    @dudeabideth4428 6 หลายเดือนก่อน +1

    There is no os involved in specifically running machine code . The machine code is run on the cpu by the process that launches. Of course the whole process is launched by os but that’s true for all of this

    • @alastairtheduke
      @alastairtheduke 6 หลายเดือนก่อน

      But a process has to be managed by some OS so what's your point?

  • @rbelatamas
    @rbelatamas 7 หลายเดือนก่อน

    thanks 🎉

  • @chrishabgood8900
    @chrishabgood8900 7 หลายเดือนก่อน

    ruby is interpreted as well.

  • @numamolinapauluk5126
    @numamolinapauluk5126 5 หลายเดือนก่อน

    Impecable 👏🏾

  • @carlosvillegas33
    @carlosvillegas33 7 หลายเดือนก่อน +10

    TH-cam notification brought me here

    • @olivertheses7486
      @olivertheses7486 7 หลายเดือนก่อน

      Same😂

    • @Kane0123
      @Kane0123 7 หลายเดือนก่อน +1

      The video brought me to this comment.

  • @VuinhThanh-ol8fx
    @VuinhThanh-ol8fx 7 หลายเดือนก่อน

    How do u made the animated video like this??

  • @ziat1988
    @ziat1988 3 หลายเดือนก่อน

    I'm curious about php? It seems that it have same approach as JAVA as it use JIT?

  • @fabian-manzano
    @fabian-manzano 7 หลายเดือนก่อน

    Really nice video

  • @kaplansedat
    @kaplansedat 7 หลายเดือนก่อน +7

    c# is so much undervalued among developer community. thanks much more developers are not in developer community. very hype driven industry.

    • @Kane0123
      @Kane0123 7 หลายเดือนก่อน

      c# lets gooooo

    • @r_v_t
      @r_v_t 7 หลายเดือนก่อน +1

      For a long time C# was not a valuable option for many developers because it was windows only. So a lot of people decided to opt against targeting one OS only. With other languages like C++ , java and python you can always target the big 4

    • @kaplansedat
      @kaplansedat 7 หลายเดือนก่อน +3

      @@r_v_t yes good point. But languages evolves. We are in different page now. That was a bad decision by microsoft. They are trying to route the ship other way. Its not easy but seems they are in good way.

    • @Winnetou17
      @Winnetou17 7 หลายเดือนก่อน

      @@r_v_t The big 4 ? I assume you mean Windows, Linux and MacOS.... what's the fourth ? Android (which is also Linux, but with different userland tools) ?

    • @Danielm103
      @Danielm103 6 หลายเดือนก่อน

      That’s because of Microsoft and their depreciation of Framework. There was a time where Core wasn’t up to snuff. I’ll never touch C# again

  • @BigBoss-670
    @BigBoss-670 5 หลายเดือนก่อน

    Hello there. I am currently working in the field of web and mobile applications. I use JavaScript as a frontend. I normally use Php in Beckend, but now I want to use Java or Python. Which language is easier to use with JavaScript (similar in syntax), more performant or more compatible. Which language can offer me different alternatives for the future except for application development? Please tell me only one of these two languages. I would appreciate it if you explain why.

    • @osogrande4999
      @osogrande4999 5 หลายเดือนก่อน

      Python as a backend language for your web services is what I’d go for. Compatibility with your front end is irrelevant, but if you are worried about learning another language and want it to be Javascript-like then neither Java or Python are Javascript like. One could argue that curly braces and certain constructs like for loops look similar in Java, but it’s not really going to help. As for python back end support, you can write a Python web service using Flask or FastAPI in literally seconds once you know what you’re doing. (I don’t use Django, but it paves the way for relatively straightforward REST solutions). For most applications Python is performant enough and besides there are many scaleability options.
      I have plenty of experience in all these and for my money I’d stick with Python. The commercial user space is vast, as is the support, and as a language it is very easy to learn and get immediate rewards. For other uses apart from backend, well, obviously it has massive AI/data/machine learning tooling and user spaces, and it’s widely used for all kinds of glue and scripting applications. Learn Java too if you like but I think you’d end up having python as your go to language for more than you would Java. If you’re wanting to develop natively for Android, obviously that’s going to want Java (or Kotlin). Good luck. Check out FastAPI and get yourself a 5 line example web application running using uvicorn to serve it (or simply run it with the built in development server) and you’ll quickly see the potential.

  • @systemBuilder
    @systemBuilder หลายเดือนก่อน

    Scala is a good example of another language that compiles into JVM - it can run under any JVM of the right version.

  • @jw_sw8157
    @jw_sw8157 7 หลายเดือนก่อน +1

    GOAT Channel

  • @GoatZilla
    @GoatZilla 6 หลายเดือนก่อน +1

    wat is a .pyc file?

  • @yanjh222
    @yanjh222 7 หลายเดือนก่อน

    great!

  • @lawniczakjohn
    @lawniczakjohn 7 หลายเดือนก่อน

    2:22 But who was gonna win the race?

  • @siriusleto3758
    @siriusleto3758 6 หลายเดือนก่อน

    Great.

  • @jojolization
    @jojolization 29 วันที่ผ่านมา

    how about the .net language?

  • @humaidahmedabuzinjal6257
    @humaidahmedabuzinjal6257 7 หลายเดือนก่อน +1

    I thought python works like java. Its source code turns to source code then get interpreted?

  • @seu8867
    @seu8867 6 หลายเดือนก่อน

    Awesome

  • @karlostj4683
    @karlostj4683 6 หลายเดือนก่อน +1

    "Java is also designed to be memory-safe and secure. With features like automatic memory management."
    No more need for developers to release any memory their programs allocate! Java uses a built-in "garbage collector" and pays close attention to allocated memory blocks that are no longer being referenced! Except: The Java default "garbage collector" only collects garbage when the Runtime runs out of memory. This generally results in a "pause" - your application halts - while the GC walks through its map of which blocks of memory are no longer being referenced, anywhere in your application.
    As for security: As a result of the lack of just-in-time garbage collecting, any Java objects your application creates will remain in memory, possibly forever. This means critical data that should be expunged from memory as soon as it's no longer needed (such as passwords delivered as String objects) are hanging around, until the Runtime runs out of memory. This is a serious security issue.

    • @luksion
      @luksion 4 หลายเดือนก่อน

      There is java.lang.ref.SoftReference to mitigate this security issue. It is a way to basically make the GC release the object in the next gc when it has not any reference about it.

  • @anshulpandey1
    @anshulpandey1 7 หลายเดือนก่อน +1

    Next Video: JVM based languages like Java VS Scala vs Kotlin

  • @serhiivoronkov3914
    @serhiivoronkov3914 6 หลายเดือนก่อน

    You didn't mentioned that we can build java native

  • @amirhoseingharaati5331
    @amirhoseingharaati5331 7 หลายเดือนก่อน +2

    Based on what Kyle Simpson says in the YDKJS books series: JavaScript is a compiled language.

  • @pavansakpal4816
    @pavansakpal4816 3 หลายเดือนก่อน

    Types of linux explain sir

  • @ivandofek7133
    @ivandofek7133 2 หลายเดือนก่อน

    C# where is between these languages ?

  • @plekkchand
    @plekkchand 6 หลายเดือนก่อน

    What's "co"?

  • @konstantechang2779
    @konstantechang2779 5 หลายเดือนก่อน

    awesome

  • @zixuanzhao6043
    @zixuanzhao6043 หลายเดือนก่อน

    why there's java-vm but no python-vm or ruby-vm?

  • @abhinav.t1602
    @abhinav.t1602 7 หลายเดือนก่อน +1

    Thank you Sahn, but please consider having a better audio system. The volume is very low and not everyone wants to use speakers or headphones all the time.

  • @john_g_harris
    @john_g_harris 6 หลายเดือนก่อน +1

    Java : The Java Virtual Machine (JVM) and Java program have to be at compatible language releases. "Run everywhere" has some limitations.

  • @miraculixxs
    @miraculixxs 7 หลายเดือนก่อน +13

    There are some glarying issues with your summary graphic. All programming languages need source code, not just Python. Python is compiled to Bytecode first, and only then executed by the Python VM (the interpeter). Very much the same as Java.

    • @miraculixxs
      @miraculixxs 7 หลายเดือนก่อน +1

      @@potatoandpippen Your comment makes me so happy 😁

    • @frogzie
      @frogzie 6 หลายเดือนก่อน

      Not really. The Java compilation phase is done only once, not every time you run the code.

    • @miraculixxs
      @miraculixxs 6 หลายเดือนก่อน +5

      @@frogzie the python compilation is also done once, not every time you run the code.

  • @SajadJalilian
    @SajadJalilian 7 หลายเดือนก่อน +7

    If you use database, it doesn't matter you use pyrhon or c++ you still as fast as your database response.

    • @foreverzhu8800
      @foreverzhu8800 7 หลายเดือนก่อน +2

      cpu:how can I execute instructions slower than IO? (lol)

    • @thegrind9628
      @thegrind9628 7 หลายเดือนก่อน

      by the term database response , what I understood is 'querying of the db'. At the end of the day, the programming language you use to write the query command matters isnt?

    • @chpsilva
      @chpsilva 7 หลายเดือนก่อน

      Unless you are delegating to the DBMS the task of processing the query result (eg using stored procedures) then the language DOES make difference.

    • @doublekamui
      @doublekamui 6 หลายเดือนก่อน

      databases are usualy created using c++'s father too that is c 😅 like postgresql and mysql, so it already very fast for working with milions of data in just some seconds.

  • @adityaanuragi6916
    @adityaanuragi6916 7 หลายเดือนก่อน +9

    I'm confused why python is slow, it does similar things to Java
    Both compile to bytecode
    Bytecodes are then interpretted to machine code with respective VM
    So what's python slow?

    • @Ryan-hk5yb
      @Ryan-hk5yb 7 หลายเดือนก่อน +7

      Java is statically typed which makes compiling much faster, where python is dynamically typed where the interpreter has to spend much more time deciding types etc

    • @adityaanuragi6916
      @adityaanuragi6916 7 หลายเดือนก่อน +2

      @@Ryan-hk5yb then why isn't JS which is also dynamically typed also a lot more slower
      Js is slower than Java but not to the extent of python

    • @MikiMaki76
      @MikiMaki76 7 หลายเดือนก่อน +11

      as he said, python vm is an interpreter, which has to decode every line of code and execute it in real time. being dynamically typed, there is no guarantee what type of data goes into a variable and thus how memory should be handled at runtime. also, there are differences on how functions calls are retrieved and memory is handled at runtime.
      java is compiled at runtime, meaning that the vm don't need to decode anything, because it executes an assembly. so it takes some time to start, because the vm converts the bytecode into assembly, but when it starts, it's machine code. plus, java is highly optimized, meaning that the vm has some smart strategies to retrieve functions calls (stored in lookup tables) and handles memory very efficiently. the garbage collector is a slowdown though, but memory safety comes at a price.

    • @Ryan-hk5yb
      @Ryan-hk5yb 7 หลายเดือนก่อน +1

      @@MikiMaki76 what he said. there also differences in use case/engine/runtime environment

    • @IBelieveInCode
      @IBelieveInCode 7 หลายเดือนก่อน +10

      Python is crap.

  • @user-qb8tj5ok3f
    @user-qb8tj5ok3f 4 หลายเดือนก่อน

    cool video)

  • @igor9silva
    @igor9silva 7 หลายเดือนก่อน

    0:37 wait, you're not Alex?

  • @kunalsoni7681
    @kunalsoni7681 7 หลายเดือนก่อน

    :) ♥ love to watch

  • @gurupartapkhalsa6565
    @gurupartapkhalsa6565 7 หลายเดือนก่อน +6

    Make no mistake, every single language has to become CPU instructions at some point, otherwise it can't instruct the CPU. The OS does not do this, mostly the OS enforces additional rules and overhead, without any benefit outside of the limitations themselves being a sort of structure. Compiled languages compile into CPU instructions directly, full stop. hence, everything else that doesn't do that is slower and will always be slower due to the rules of reality.

    • @vijayvijay4123
      @vijayvijay4123 7 หลายเดือนก่อน

      What do you mean directly? Interpretation is also direct

    • @miraculixxs
      @miraculixxs 7 หลายเดือนก่อน +2

      Unfortunately this is a very common misconception. In fact "to compile" just means translating from source code format to execution format. It does not, however, mean to translate into (native) CPU instructions. There are many languages that compile source code into so called bytecode, which then gets executed by an interpreter, also known as a "virtual machine" (VM). For example Java, Python, JavaScript, Ruby all use this approach.

    • @vijayvijay4123
      @vijayvijay4123 7 หลายเดือนก่อน

      What if the byte codes are optimised in such a way that some parts of those byte codes are directly executable machine codes without the need for interpretation. I think that's what the video means. Bazinga 🙄

    • @miraculixxs
      @miraculixxs 7 หลายเดือนก่อน +2

      @@vijayvijay4123 t
      Good idea, yet that's not how it works. Bytecode always gets executed by a VM. Some VMs do "hot native compilation" which turns some parts of the bytecode into CPU machine code, making it faster. That's called just in time compilation, JIT for short.

    • @alexandretorres5087
      @alexandretorres5087 6 หลายเดือนก่อน +1

      ppl, everybody is ignoring the BIOS layer...

  • @blackrock1404
    @blackrock1404 3 หลายเดือนก่อน

    🎉🎉🎉

  • @tyrojames9937
    @tyrojames9937 5 หลายเดือนก่อน

    COOL!.

  • @adelarsq
    @adelarsq 7 หลายเดือนก่อน +2

    So C++ is C#?
    Nevermind, great video =)

    • @Kane0123
      @Kane0123 7 หลายเดือนก่อน +1

      C# is C++ times 2

  • @DK-ox7ze
    @DK-ox7ze 7 หลายเดือนก่อน +3

    If Java is compiled just in time before execution, then it means it's compiled in stages, like how Javascript is complied by JIT complier in stages. Then why is Java significantly faster than Javascript?

    • @NoName-lz6bc
      @NoName-lz6bc 7 หลายเดือนก่อน

      Same question

    • @jasoncheng4250
      @jasoncheng4250 7 หลายเดือนก่อน

      just guessing, but i assume it has to be the advantages with first compiling to bytecode, where javascript interpreter does not has this step.

    • @Nerdimo
      @Nerdimo 7 หลายเดือนก่อน +3

      JavaScript isn’t strongly typed unlike Java, so it might have to do additional checks which I think could make it slower

    • @Nerdimo
      @Nerdimo 7 หลายเดือนก่อน +1

      What does an interpreter do? Doesn’t it just read your code line-by-line and turn it into machine code? Does this make it like a JIT compiler or is what separates them the idea that interpreters don’t convert the source code into byte code vs. JIT compilers need byte code?

    • @superdingo9741
      @superdingo9741 7 หลายเดือนก่อน +9

      Java is compiled to byte code at the compile time (not execution time, as Python). The byte code is machine code for Java virtual machine - JVM (it's just an abstract computer). And then Java code is run and executed by JVM without additional compilation (almost the same as C++ does, but the code is executed not by raw hardware, but the software called JVM). It's faster than interpreting every line as Python does, but way slower than C++'s approach with pure machine code. At the runtime, JVM detects some places in the program that are executed often (e.g. loops and often-invoked methods) and compiles only those pieces of code to real machine code. The latter process is called Just-in-time (JIT) compilation and it expedites execution up to tens times.

  • @michaeltse321
    @michaeltse321 7 หลายเดือนก่อน +1

    whether it's native code, or running in JVM or intepreter, on the fundamental level they (native, JVM or interpreter) all end up running machine code on the CPU - lol - With JVM or Interpreter that has a JIT, that means some byte code or script is compiled into native code and run on the CPU. But some is still run in the JVM and intepreter but again utimately JVM and intepreter is running in the CPU as native code. Python and Java both have compilers that generate native code - just mentioning - lol

  • @Roltun
    @Roltun 5 หลายเดือนก่อน

    where is php?

  • @nathanbenton2051
    @nathanbenton2051 7 หลายเดือนก่อน

    write once, debug everywhere (i'm terrible at java, so that makes sense)

    • @Kane0123
      @Kane0123 7 หลายเดือนก่อน

      Technically if you start from scratch each time you only ever write it once.

  • @user-gh4lv2ub2j
    @user-gh4lv2ub2j 2 หลายเดือนก่อน

    Wrong about python (of course). Python runs c/c++ libs at native speeds as it has a native interface for them called ctypes.

  • @davidwebster9788
    @davidwebster9788 2 หลายเดือนก่อน

    I have often thought that the real reason for the proliferation of languages is to give CompSci PhD students something to do.

  • @user-dj6uo5ki9c
    @user-dj6uo5ki9c 6 หลายเดือนก่อน

    انا نفسى اتعلم ممكن تعلمني

  • @angusmackaskill3035
    @angusmackaskill3035 หลายเดือนก่อน

    I programmed in xbase and dabbled in visual basic

  • @luciantarba6436
    @luciantarba6436 7 หลายเดือนก่อน

    typo at 4:06, JaveScript -> JavaScript

    • @Kane0123
      @Kane0123 7 หลายเดือนก่อน

      Probably just a new framework.

  • @Danielm103
    @Danielm103 6 หลายเดือนก่อน +1

    C++ and Python for the win

  • @joaquinginestet4813
    @joaquinginestet4813 6 หลายเดือนก่อน

    People, i want to choose phyton or java as my primary lenguage, but idk where start. I am studing informatics engineering

    • @RoysIdea
      @RoysIdea 6 หลายเดือนก่อน

      Heard that Python is easier to learn than Java. But also heard that learning Java as a first language will make learning other languages easier.
      Not sure if I like this last reasoning. For me Java is an older more mature language that also contains more and more contradictions and unnecessary confusions.

    • @Plajerity
      @Plajerity 5 หลายเดือนก่อน

      I think you shouldn't look at programing language as something "primary". Learning new programming language might take a few months, but if you know another language, with GPT-like tools you can quite easily switch to another one. My main language is Python. I wrote a few very small programs in C++ and java. 2 years ago, it was a struggle - word by word, just like with new language. Today I could write a description and most likely generated code will be working. Today I guess it works mostly for Python, but in a few years these tools will be even better.
      You should focus on things that will be hard for computers. Unless they gonna replace us completely... Such things are design patterns and overall knowledge like database types, design pattern, where to use what. And search for skills required in your area - the hardest part might be getting the first job.
      I think AI will replace us first in creating simple web pages, and it'll happen quite fast. So landing job in this field will be hard. You might want to take this into account.

  • @batsuhbaysaa7171
    @batsuhbaysaa7171 6 หลายเดือนก่อน

    Hello bro, can you subtitle this video you made and upload it on your channel? Translate subtitle into Mongolian and deliver it to people who are learning to be young programmers. Translate into Mongolian...

  • @alii_ce
    @alii_ce 25 วันที่ผ่านมา

    so golang is super balance!

  • @markdanielesplanaperilla
    @markdanielesplanaperilla 6 หลายเดือนก่อน +1

    Bro thought Go is faster than C++.

  • @undergraduate6050
    @undergraduate6050 7 หลายเดือนก่อน

    What about c#?

    • @Kane0123
      @Kane0123 7 หลายเดือนก่อน +1

      Its blazingly fast.

  • @bruceliebewilma
    @bruceliebewilma 7 หลายเดือนก่อน

    Still, why is there no united programming language? We build so many kinds of wheels?

    • @bruceliebewilma
      @bruceliebewilma 7 หลายเดือนก่อน

      Would it be possible to build a language that depending on the scenario to choose either compiler, interpret, or virtual machine way??? If it is possible and no one do it, then it's not the problem of the programming language any more.

    • @markdanielesplanaperilla
      @markdanielesplanaperilla 6 หลายเดือนก่อน

      "United programming languages" is like saying "United transportation, I want a car that becomes a submarine whenever I want".

    • @bruceliebewilma
      @bruceliebewilma 6 หลายเดือนก่อน

      @@markdanielesplanaperilla There are already such kind of cars. It’s just expensive

  • @muhammadfaisalemir3172
    @muhammadfaisalemir3172 หลายเดือนก่อน

    Punya Ku😊

  • @SantoshHariSsk
    @SantoshHariSsk 7 หลายเดือนก่อน

    👍

  • @luisdanielmesa
    @luisdanielmesa 7 หลายเดือนก่อน +6

    Performance is important, but energy consumption as well... Java uses 1.5 as much energy as C, although slower than Java nowadays, it still is more energy efficient... and Python uses 30 times as much energy as Java and 50 times as much energy as C.

    • @Winnetou17
      @Winnetou17 7 หลายเดือนก่อน +2

      Did you just say that C is slower than Java nowadays ?

    • @Maverick56912
      @Maverick56912 6 หลายเดือนก่อน

      ​@@Winnetou17yeah 😂

    • @Winnetou17
      @Winnetou17 6 หลายเดือนก่อน

      @@Maverick56912 Blasphemy!

  • @theintjengineer
    @theintjengineer 7 หลายเดือนก่อน

    C++ ❤

  • @ytfeelslikenorthkorea
    @ytfeelslikenorthkorea 7 หลายเดือนก่อน +1

    Java offers headaches, no balance :)

  • @zbyniu-gh8sg
    @zbyniu-gh8sg 2 วันที่ผ่านมา

    JAVA is like a wheel: invented long time ago, but still needed :)

  • @karlostj4683
    @karlostj4683 6 หลายเดือนก่อน +4

    Java's original marketing tagline: "Java: Write Once - Run Anywhere."
    Java developers' actual experience: "Java: Write Once - Debug Everywhere."

  • @JacobKasperek
    @JacobKasperek 7 หลายเดือนก่อน +2

    As the video is probably targeting new programmers on non-techies a quick note should be given on Java-Kotlin - "Kotlin is Android's recommended programming language for modern android development"