From the course: Faster pandas
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
What is Numba?
- Number is a JIT compiler. JIT stands for, Just In Time compilation. When we compile code to machine code during grand time versus the traditional compilation time. When you use one of number's G decorators, it return a dispatcher object, and this happens at compile time. And then at runtime when you call the function, the dispatcher will check if there's a compile code for this argument types. And if not, we'll generate it. And then it will run this compile code. Let's have a look. So first we need to install number. It's a Python, the sham PIP install number. And now we can try that. So I Python let's define a simple function. Beth, add a and B. Return a plus B. And let's have a look at what the Python generated for this function. So import this, which is a disassembler and this dot this of the function. And we see, we have loading of two parameters, a binary ed, and then a return value. Now we're going to import number and we're going to do the same function just with numbers. So…