PyPy: The FASTEST Python implementation

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • "If you want your code to run faster, you should probably just use PyPy."
    - Guido van Rossum, 2015 ( • Type Hints - Guido va... )
    I mean, who can argue with the big boss?
    Resources:
    • More detailed architectural discussion: doc.pypy.org/e...
    • Real Python article: realpython.com...
    -
    If you enjoy my content, consider supporting me on Patreon or becoming a member!
    patreon.carber...
    join.carberra.xyz
    If you need help with anything, feel free to join the Discord server:
    discord.carber...
    I get a lot of people asking, so here's my Visual Studio Code setup!
    • My Visual Studio Code ...
    -
    If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.
    #python #coding #howto

Комментарии • 41

  • @Carberra
    @Carberra  Год назад +10

    I mentioned at 3:05 that PyPy can't use C-libraries. This is actually incorrect; I meant to say that they run slower in PyPy than in CPython: doc.pypy.org/en/latest/faq.html#do-c-extension-modules-work-with-pypy

  • @SoniyaMojumder-k3d
    @SoniyaMojumder-k3d Месяц назад

    Kilback Drives

  • @BarryRobinson-e6n
    @BarryRobinson-e6n 3 дня назад

    Walker Union

  • @JoeMarner-s1b
    @JoeMarner-s1b 22 дня назад

    Dietrich Station

  • @TimCranney-o4i
    @TimCranney-o4i 25 дней назад

    Anderson Spring

  • @KatelinGreening-o8h
    @KatelinGreening-o8h 29 дней назад

    Maxime Spur

  • @HodgsonBart-n1r
    @HodgsonBart-n1r 7 дней назад

    Gideon Locks

  • @NellyPhilip-w2j
    @NellyPhilip-w2j 25 дней назад

    Madie Locks

  • @MikeBaldwin-l8c
    @MikeBaldwin-l8c 29 дней назад

    Meaghan Shoals

  • @zainabbi5480
    @zainabbi5480 21 день назад

    Horace Canyon

  • @DoloresHorne-n1f
    @DoloresHorne-n1f Месяц назад

    Pearlie Forge

  • @HarperJoan-i7p
    @HarperJoan-i7p 11 дней назад

    Lehner Views

  • @YonngRyan-q4y
    @YonngRyan-q4y Месяц назад

    Keenan Hollow

  • @felixfourcolor
    @felixfourcolor Год назад +4

    The fact that it runs numpy slower than CPython makes it not very useful. I can't imagine any scenario where your python program is so computationally expensive that you need a faster alternative, but you don't already use numpy.

  • @FaradayAlexander-m6l
    @FaradayAlexander-m6l 11 дней назад

    Hudson Knoll

  • @LahomaBanton-c8o
    @LahomaBanton-c8o Месяц назад

    Brown Brook

  • @CharlenaHtwe-m8i
    @CharlenaHtwe-m8i 25 дней назад

    Torp Crossing

  • @highcap4952
    @highcap4952 Год назад +4

    there is now pypy 3.10 out

    • @Carberra
      @Carberra  Год назад +2

      Oh nice! Sorry, thought I replied when I saw this, must've gotten distracted checking it out lmao.

    • @maciejzettt
      @maciejzettt 2 месяца назад

      3.12 actually 😅

    • @Carberra
      @Carberra  2 месяца назад

      Where? Their website only says up to 3.10.

    • @maciejzettt
      @maciejzettt 2 месяца назад

      @@Carberra I might have misunderstood the context 😅
      But it's very nice that you still keep up with comments under old videos!

    • @maciejzettt
      @maciejzettt 2 месяца назад

      Which now seems dumb as OP clearly meant pypy 🙄

  • @bennguyen1313
    @bennguyen1313 3 месяца назад

    Any thoughts on using pyscript instead of javascript? I understand it's known to be much slower but perhaps techniques/updates have changed recently where the performance hit isn't so bad?

    • @Carberra
      @Carberra  3 месяца назад

      From what I've seen, pyodide (what it runs on) does take quite a while to load. From a performance standpoint alone it's probably not worth it. I did a video on it a little while ago if you're interested to learn more though.

  • @samucancld
    @samucancld 6 месяцев назад

    great video! what's your vsc theme and icon pack?

    • @Carberra
      @Carberra  6 месяцев назад

      Thank you! VS Code setup is in the description (:

  • @JoseDavis-i8k
    @JoseDavis-i8k 11 дней назад

    Tianna Forks

  • @legion_prex3650
    @legion_prex3650 Год назад

    great, thanks man!

  • @DebraBaxter-w1c
    @DebraBaxter-w1c Месяц назад

    Botsford Island

  • @alanjohnstone8766
    @alanjohnstone8766 Год назад

    Can it handle Pytorch?

    • @Carberra
      @Carberra  Год назад +2

      As far as I can tell, no.

  • @laundmo
    @laundmo Год назад +2

    the fastest? i wouldnt be so sure about that. Nuitka can be really fast in some cases, Taichi/Numba are technically implementations of python, which JIT compile it, Cython compiles type-annotated python to C, MyPyC also compiles mypy-checked python... and almost all of them are in some ways faster than PyPy.

    • @Carberra
      @Carberra  Год назад +6

      The things you've mentioned there are compilers (or numerical accelerators in Numba's case), not implementations.
      wiki.python.org/moin/PythonImplementations

  • @JJayaraj-fs1di
    @JJayaraj-fs1di 3 месяца назад

    Hi im trying to use PyPy as interpreter in jupyter notebook but I cannot install packages using "pip install package_name" or "pypy -m install package_name". Can u suggest a solution

    • @TimMountjoy-zy2fd
      @TimMountjoy-zy2fd 2 месяца назад

      The best solution to this and every other IT problem you have is sign up for AI helper. I pay $ 25 and $ 10 a month for BITO and Co-Pilot in VS Code and they save me 75% time by being able to almost always help when I get a problem like you describe. There are others and they are probably just as good. AI is REALLY REALLY useful with programming and IT issues.

  • @encapsulatio
    @encapsulatio Год назад

    "The FASTEST Python implementation"
    Graal Python or GraalPy would disagree. GraalVM provides a Python 3.8 compliant runtime. The aim is to bring compatibility up to python 3.10.

    • @owlmostdead9492
      @owlmostdead9492 6 месяцев назад

      In my very limited testing Graalpy is 2-3x slower than pypy3.10

  • @khanra17
    @khanra17 Год назад +4

    2 min content in a 10 min video