Python(PyPy) is faster than C++ or NOT !

Поділитися
Вставка
  • Опубліковано 4 лис 2024
  • Understand the difference between C++ and python !

КОМЕНТАРІ • 15

  • @blabla-kk8bl
    @blabla-kk8bl 2 роки тому +3

    The reality is , C++ is much more faster than python ,even pypy interpreter cannot come closer. But the fact that if you want to get job done the only way to go is using python. Also combining python with C plugings give faster results. Python is in-time compiling language, also it has uncompareable abilities like libs so it makes it slower too. Good things comes with a cost ,not free.
    In otherwords ; C++ can run for you very fast calculator but the real products is not just a calculator, there is authentication, payment gateways, data visualising , web development the python is the filler in this position. So better approach can be deploying c++ microsrvices around tha python (Django can managage an app very well) main python app.

  • @johnkim8063
    @johnkim8063 2 роки тому +2

    Oh.. I'm shocked..!! I don't have used the c++ with 100% speed of one because I didn't write the -O3!! Thank you very much!

  • @eriliaerish4967
    @eriliaerish4967 2 роки тому +1

    When you use -O compiler removes unuseless variables , I guess in c++ optimized program , app NOT add something to variable. you should to see assembly code what executed of compiler

    • @letsplaychannel6276
      @letsplaychannel6276 Рік тому

      Using -O just tells the compiler to rename the executable. Your confusing -O with -o2

  • @imadlatch7206
    @imadlatch7206 Рік тому +1

    you are just trying to find the weak point in pypy to prove that c++ always wins, no one would use function to open file a million time at onec. this is a missleading here.

    • @ulasdikme7307
      @ulasdikme7307  Рік тому

      No I am not looking for any weak points. I saw that in the internet some developers(most of them working in big companies) assume that python is faster than c++ without any examples or with wrong examples. The intention of this video is to show C++ is faster than python. But as I told it, there are other advantages with python too. If you have any examples that python is faster than C++, I will be happy to create content about it :)

    • @imadlatch7206
      @imadlatch7206 Рік тому

      @@ulasdikme7307
      my comment was not meant to prove python is faster than c++ or not , but to complain about the way you used to prove PyPy is slow. anyway python has a different purposes than c++ like Data Analysis/Micro Coding/Web Scraping/Web Development/Magic Functions/etc which c++ can't compite python in fast coding and performance, in the other hand Python can't compite c++ in many cases as well, this is what it should be clarified.

    • @ulasdikme7307
      @ulasdikme7307  Рік тому

      ​@@imadlatch7206 Okay, then what is the proper case to show the difference? I can use it in my next contents?

  • @kefrov
    @kefrov Рік тому

    Time to learn C++ for competitive programming then.

  • @klangrein9389
    @klangrein9389 3 роки тому +2

    after showing assemler code of optimized c++ why aren't you showing the same xor operation for python as well? It could be programmed and compared likewise. Otherwise there is really no point in showing a measurement without a useful comparision.

  • @kasi0
    @kasi0 2 роки тому

    Make a comparison using the pyautogui library with python vs. pypy to see which one does better

  • @ahmeta.112
    @ahmeta.112 3 роки тому +1

    Hocam aksanınız çok güzel.

  • @patricior7300
    @patricior7300 2 роки тому

    Could You compare Julia language vs C++ please? Tnx

  • @ДиамондКарбонов
    @ДиамондКарбонов 2 роки тому

    👍

  • @LevelUpGA
    @LevelUpGA 2 роки тому

    8.4e-5 ms*10/10=84e-6 ms= 84 ns, but you wrote 840 ns, it's 10 times faster 😂