Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A decorator is run at compile time and it’s output replaces the decorated function. The new replaced function could then have a jit at runtime. I don’t know if that’s what’s happening, but using a decorator doesn’t mean it cant also be a jit.


FWIW numba at least supports both cases depending how the decorator is used:

- if you just `@jit`, it will create a megamorphic function with specialisations generated at runtime

- if you pass a signature to `@jit`, it will compile a monomorphic function during loading




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: