Skip navigation
pov: you're a CPU waiting for Python to run a single line of code
0:00 / 0:46

pov: you're a CPU waiting for Python to run a single line of code

Valentin Ignatev

@valigo16K followers

Visit on X
2,490 likesDownloadOriginal post

47,961 views

pov: you're a CPU waiting for Python to run a single line of code

22 Comments

Comments from the original post on X (Twitter)

  • avrl ☘'s profile picture

    @avrldotdev

    CPU waiting for rust code to get compiled

    43 likes

  • Roy's profile picture

    @__roycohen

    One day someone told me "Just don't use Python" and I've been a free man ever since.

    16 likes

  • mouth's profile picture

    @bublboie

    do you understand what a CPU is? (it's the thing that runs python)

    7 likes

  • Mr Tomycj's profile picture

    @Tomycj1

    I don't understand, isn't the CPU busy running that python code? I imagine python is slow because it makes the CPU do lots of things, so the CPU is more busy than it should be for a given task.

    7 likes

  • (infinite-jes)'s profile picture

    @lawofcons

    Python's like me. It likes to take its time.

    6 likes

  • Victor Garcia's profile picture

    @vmg__0

    The ruby code on Github's servers after getting 275m commits a week

    5 likes

  • 🐔🇩🇴 kikirikii's profile picture

    @polloimperial_o

    Is this the real thing?

    4 likes

  • Valentin Ignatev's profile picture

    @valigo

    @polloimperial No community note means yes!

    85 likes

  • 🐔🇩🇴 kikirikii's profile picture

    @polloimperial_o

    Hahahaha It would be funny if you got community noted by the python foundation

    1 like

  • CapacitanceZ's profile picture

    @Capacitancezeng

    I think about this scene from Megamind often

    4 likes

  • Reece's profile picture

    @RLeRoux64

    Facts and also great movie

    3 likes

  • Tom Miller's profile picture

    @TommyYesItsMe

    Game engines written in C++ struggle when you have more than a thousand NPCs on screen. Meanwhile Python can render 100,000 NPCs at the same time: At 120 fps. Maybe it's not the language, it's the skill that's the issue. 🤪

    2 likes

  • Wokensöldner's profile picture

    @fulong666

    wrong if you add two numbers somewhere a C ffi is being called

    1 like

  • Paths's profile picture

    @ItsNotPaths

    the thing i hate the least about python is the speed/idea, its the packaging and bloat and all around out-doneness by a million other things

    1 like

  • RH Fardin's profile picture

    @rh_fardin

    CPU entered retirement before that line finished

    1 like

  • rusa's profile picture

    @rusabuilds

    the funny part is how often the cpu is right to wait. most python lines are calling into c that's already fast. the slowness you feel is interpreter overhead between the fast parts, not the work itself. python is a great conductor and a terrible instrument.

  • fgei3gi's profile picture

    @bhvsh_1

    Wouldn't it be running code the interpreter and other setup code until it rubs real code

  • Kamen's profile picture

    @KamenOnDebug

    CPU waiting for me to code something 🫡

  • DK's profile picture

    @DarKnaudOffi

    Just put n_jobs=-1

  • Joaquin's profile picture

    @joakin

    Banger