Make Python 1000x Faster With One Line 🐍 ⏩ (Numba Tutorial)

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 36

  • @StanislavBober
    @StanislavBober 3 роки тому +71

    You can use @njit(cache=True) to avoid repeated compilation at each script execution by caching compiled function on ssd or hdd. Also njit can be used without decorator notation, i.e. cf = njit(f).compile('()') will forcibly compile function f and save aquired reference to cf. Here '()' is a signature of function f without arguments and returned value.

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

      @Mr. Paul Andy Numba will recompile modified function because cache keeps full text of compiled function also. You can find 2 files in working directory that relate to compiled function f from module main.py.

  • @vishnukumar3596
    @vishnukumar3596 11 місяців тому +3

    Thank you so much dear.
    Ur explanation is just like a wow..
    Respect from India

  • @Omena0
    @Omena0 9 місяців тому +3

    YOU'VE BLINDED ME

  • @ashishdev2024
    @ashishdev2024 10 місяців тому

    Would doing this on server-side to filter SQL queries quickly work and be good?

  • @GustavoAlmeida-FB
    @GustavoAlmeida-FB 2 роки тому +3

    Thank you! 👏🏾

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

    Thank you so much man.

  • @genclik6146
    @genclik6146 2 роки тому +4

    I cant use it in python 3.10? it gives error: "No module named 'numba'

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

      you have to install it

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

      @@TheBuilder ohh that means I cant use it in olympic thx

  • @jeffhart7649
    @jeffhart7649 4 місяці тому

    The list append operation is pretty inefficient. Numba would speed up a ton if that list could be a numpy array instead.

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

    How would njit work with pyinstaller? would it compaile with the pyintsaller compiler or would it do its own compiling when running the exe?

  • @vhlk
    @vhlk Рік тому +10

    Err.. that's was actually two lines 🤓

    • @TheBuilder
      @TheBuilder  Рік тому +17

      brb deleting video

    • @vhlk
      @vhlk Рік тому +2

      @@TheBuilder 🤣

  • @AJ-et3vf
    @AJ-et3vf 2 роки тому +3

    Awesome video! Thank you!

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

      happy to see people getting value out of it

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

    hey what editor are you using

  • @tedarcher9120
    @tedarcher9120 3 роки тому +1

    What is faster, numba or pypy compiler?

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

      Numba has support for parallel for loops and CUDA

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

    Can i use it before for i in range becoz it gives error @ or def expected

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

      its supposed to go on top of functions. look up how decorators work in python

  • @AB-cd5gd
    @AB-cd5gd 7 місяців тому

    Does it work on front end like tkinter ??

    • @TheBuilder
      @TheBuilder  7 місяців тому

      why do you need to speed up your front end code?

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

    Numba ❤

  • @legendarys2
    @legendarys2 4 дні тому

    Taichi?

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

    Thanks

  • @MichaelWDietrich
    @MichaelWDietrich 7 місяців тому

    Ok that was a 3x improvement where you clickbait a 1000x. I think one should avoid this channel from being recommended.

    • @TheBuilder
      @TheBuilder  7 місяців тому

      I'm glad you enjoyed the video

    • @andrasgraff5984
      @andrasgraff5984 6 місяців тому

      Man. At this point, basicaly every youtuber does clickbait titles. Why u hating on one channel for doing it. At the very least this video provides some actually useful information, unlike others, even though the numbers might be a bit exaggerated.

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

    Thank you