Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling Numba before first run #18

Open
SterlingYM opened this issue Jan 6, 2021 · 2 comments
Open

compiling Numba before first run #18

SterlingYM opened this issue Jan 6, 2021 · 2 comments
Labels
enhancement New feature or request speedup

Comments

@SterlingYM
Copy link
Owner

Numba @njit slows down the code for the first run, probably due to the compilation time. Is there any way to compile when PIPS is imported?

@SterlingYM SterlingYM added speedup enhancement New feature or request labels Jan 6, 2021
@arjunsavel
Copy link
Collaborator

This makes sense! I'd only @njit functions that are called many times, in general — such as model evaluation functions in a curve-fitting routine. Or things that are called in loops!

There are some fancy compilation-saving routines that are possible — such as ahead-of-time compilation, I believe.

I can take a peek at the dev branch tomorrow!

@SterlingYM
Copy link
Owner Author

So far my plan is to use @njit only on the very core functions that are called many times, such as fourier() or gaussian(). I've looked at AOT but it seems too much for this issue. Probably we can quietly run such functions once PIPS is imported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request speedup
Projects
None yet
Development

No branches or pull requests

2 participants