Why is Python So Slow & Does it Matter?

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ค. 2024
  • In this video we are going to discuss the fundamental question of why Python is so slow and if it actually matters.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
    Timestamps:
    (0:00) Intro
    (0:17) Fundamentals
    (3:32) Reason 1 - Interpreted
    (7:14) Reason 2 - GIL
    (11:54) Reason 3 - Dynamic Typing
    (14:57) Does it Matter?
    (19:20) Outro
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @Popart-xh2fd
    @Popart-xh2fd 6 หลายเดือนก่อน +2

    The problem of Python is not just about slowness, it hangs a lot, it's very sluggish, it may simple stop for one second without doing anything at all if your pc is doing other thing, and the resumes for a while, and for a while it may be very fast, to after another while becomes ultra slow and then hangs again for like a second, then resumes again, and so on....!

  • @ndujamz
    @ndujamz ปีที่แล้ว +2

    When I studied, software development to write a program that runs faster during the execution time was imperative, now we live in the world where we need to develop faster and it's doesn't matter how slow the execution time is.

  • @iam_muni_baa
    @iam_muni_baa 3 ปีที่แล้ว +3

    Thanks for the video 🙂 all doughts clear .
    Waiting for flutter brother

  • @harikrishnanb7273
    @harikrishnanb7273 2 ปีที่แล้ว +5

    "dynamicly typed is a major problem".
    julia(programming language) : is it?

  • @diconicabastion5790
    @diconicabastion5790 2 ปีที่แล้ว +3

    Most other area? Yea, not so sure about that. Industrial controls, OS, Data bases, Games, communication, networking, Web Servers, Ray Tracing, AI ... Yea, I'm trying to think as an adult programmer when was I not trying to get the most performance out of code I wrote? I can't think of a single instance code performance since the time I left high school that wasn't factor.
    The last time I didn't have it as a factor was in high school with BasicA.
    When you have CPU burning through cycles over and over again it doesn't have to that eats up added power. That cost companies money and wastes resources. You could even argue it is harmful to the environment.

  • @abhinavchoudhary6849
    @abhinavchoudhary6849 3 ปีที่แล้ว +4

    Nice video really love from India

  • @harsh8712
    @harsh8712 3 ปีที่แล้ว +9

    Hey Bro, I want to ask a question from you, you created a video "zoom clone in python" in that video you told us to start a camera stream, etc. so my question is I want to close the camera window opened by clicking the button "Start Camera Stream" so how can we create a button on pressing which it would close the camera window or simply is there any way to close our camera in the way similar to the way in which we opened it.

  • @programmingnothing
    @programmingnothing 3 ปีที่แล้ว

    Thank you so much for the great tutorial provide.

    • @__Merchant
      @__Merchant 26 วันที่ผ่านมา

      Not sure how the video itself is a tutorial.

  • @miyurux
    @miyurux 3 ปีที่แล้ว +10

    Bro you are so underrated.

  • @Miracle-uc6es
    @Miracle-uc6es ปีที่แล้ว +4

    I hope it is not a very stupid question, but I wonder that, Python is interpreted language. Which is gives us a development speed time. Especially its great something like Jupyter Notebook.
    My question is Why we do not have a compiler and interpreter?
    I mean while we are programming, in development process we can use interpreter and when the final product is ready, we may choose the compile method.
    Also, Dynamically Type is another reason makes python slow.
    My another might be idiotic question is, why I cannot define statically data type? like in C.
    I know these are charactheristic of Python, but I believe that it would be good to have an option to choose.

    • @aj.arunkumar
      @aj.arunkumar 4 วันที่ผ่านมา

      checkout the new mojo lang. it is developed as a superset of python and is extremely faster than py

  • @zuberkariye2299
    @zuberkariye2299 3 ปีที่แล้ว

    Can you make a video about Python web development, and how can we create our own website just by using Python and some lib? Thanks!

  • @HuntingKingYT
    @HuntingKingYT 2 ปีที่แล้ว +2

    That snake is as slow as a snail.

  • @attahabib7933
    @attahabib7933 3 ปีที่แล้ว

    Nice bro .

  • @LNMaster_
    @LNMaster_ 3 ปีที่แล้ว

    Please, give me intro song name ?

  • @oguzhantopaloglu9442
    @oguzhantopaloglu9442 3 ปีที่แล้ว +1

    Can you make a tutorial on Jython?

  • @charan2446
    @charan2446 3 ปีที่แล้ว +3

    Can you make Cython video like part2 advanced level.

  • @demophilo1
    @demophilo1 ปีที่แล้ว +1

    I think, Julia is Python 4. It is much faster - as fast as C. It has a lot more built in methods.. There is therefore no need for such modules like Cython, Cpython, Numba, Numpy... It understands unicode and LaTeX. Julia solves the 2 language problem. Therefore it allows faster programming. There is just one advantage for python: There is much more code that exists.

  • @grjesus9979
    @grjesus9979 3 ปีที่แล้ว +9

    On why Python is slow, it depends on your application, not everyone use multithreading (GIL) or care about those ms that having an interpreted language wont give you. In reality GIL shoudnt be something bad, since it is only use when we talk about multithreading, not multiprocessing.

    • @Chertograad
      @Chertograad 4 หลายเดือนก่อน +1

      This. Many people stress about speed but in a lot of cases it doesn't matter. If you aren't building any robust heavy app or website or doing stuff like 3D games with physics or for example videorendering, speed isn't an issue.
      For those small scripts or even GUI tools that start up in less than a second it really doesn't matter if it's 0,2 seconds or like 0,7 seconds. For the end user, it happened immeditiately after clicking the app icon (or running a command in the terminal).
      Most things aren't that time sensitive either and internet speed is a bigger bottleneck than your CPU, Memory, SSD etc.
      For example if you decide to do webscraping to download content. Your internet will decide your maximum speed in that scenario. Not your choice of language.

  • @TheMaster7786
    @TheMaster7786 3 ปีที่แล้ว

    @NeuralNine rocks!!

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

    What about mpi4py?

  • @anonlegion9300
    @anonlegion9300 2 ปีที่แล้ว

    type hinting should also make it so that the types also become static. If you don't want to make it static then dont type hint

  • @shannu.666
    @shannu.666 3 ปีที่แล้ว +4

    please make a video on pypy please😭.
    Can u make comparison between cython, numba and pypy

  • @abdellatifdev
    @abdellatifdev 3 ปีที่แล้ว +1

    I use rust python

  • @user-ht7gw9ww1c
    @user-ht7gw9ww1c 3 ปีที่แล้ว

    Due to their disturbance towards me for 7 years

  • @SkyFly19853
    @SkyFly19853 3 ปีที่แล้ว +1

    The solution:
    c/c++ libraries for Python a.k.a. Cython etc.

    • @rajinfootonchuriquen
      @rajinfootonchuriquen 2 ปีที่แล้ว +1

      Why not just use c/c++?

    • @SkyFly19853
      @SkyFly19853 2 ปีที่แล้ว

      @@rajinfootonchuriquen
      What's the point to spend all of your time for dealing with bugs and slow development?
      Python lets you develop 10 times faster than C/C++ and it has less bugs to deal with.
      Cyberpunk 2077 made in C++/C# and has failed... more than 8 years development and sooooooooooo many bugs...
      Also, there are NOT many C/C++ developers...

    • @rajinfootonchuriquen
      @rajinfootonchuriquen 2 ปีที่แล้ว +1

      @@SkyFly19853 all lenguage when using in bad ways produce bugs.
      Python is slow and you are force to use modules for almost everything. Feels like you aren't even using the lenguage. It's like using chinese words with english syntax.

    • @SkyFly19853
      @SkyFly19853 2 ปีที่แล้ว

      @@rajinfootonchuriquen
      if you wanna spend your rest of your life and ignore the examples I have given you...
      Then, I wish you the best of luck just like what happened to Cyberpunk 2077 which took around 8 year and more... failed financially... went bankrupt...

    • @yancgc5098
      @yancgc5098 10 หลายเดือนก่อน +1

      ⁠@@SkyFly19853Failed financially and went bankrupt? Idk about you but Cyberpunk 2077 is doing just fine lol, new DLC coming out too it looks fun

  • @shravanasati9631
    @shravanasati9631 3 ปีที่แล้ว

    Use pypy if you want speed

    • @maxitube30
      @maxitube30 3 ปีที่แล้ว +1

      no all libs are supported

  • @kurama_chakra
    @kurama_chakra ปีที่แล้ว

    Cython

  • @s1ckskunk
    @s1ckskunk 3 ปีที่แล้ว +3

    I don't think that python is slow, I test with R and Julia they has the "some" time

  • @sunritjana4573
    @sunritjana4573 3 ปีที่แล้ว +2

    First!

  • @shannu.666
    @shannu.666 3 ปีที่แล้ว

    Please consider my comment below😢😢

  • @appdevelopersandrelatedcha6498
    @appdevelopersandrelatedcha6498 2 ปีที่แล้ว

    slow

  • @shrikanttyagi8798
    @shrikanttyagi8798 3 ปีที่แล้ว

    It's very very big disadvantage.. it's better ban the Python technology it's destroy developer carrier.

  • @01MeuCanal
    @01MeuCanal ปีที่แล้ว

    Python doesn't make sense to me at all. The industry release new processors and system every year just to get more speed and people will throw that speed into garbage using a slow language! So its better to rewrite your program in C++ and you will not need to buy another processor in next 5 years or more.
    Using Python is the same thing as to buy a Ferrari, connect it to a truck, and use your Ferrari to drag a truck around.
    Speed is super important, so there's a fast innovative hardware industry.
    It better to use a fast language to more important and used things and sometimes when you just need a fast development, use a easier to write language but still efficient like Nim. Nim is an almost as easy to use as python but faster by default.