Skip to content
Discussion options

You must be logged in to vote

Your last code snippet, returning the jitted function, would be the recommended way to do this.

The example you quote from the tutorial is about jitting within a loop, which leads to repeated JIT-compilation overhead. If you're creating a jitted function once within a factory function, that concern about repeated compilation overhead does not apply.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@JiahaoYao
Comment options

@jakevdp
Comment options

@JiahaoYao
Comment options

Answer selected by JiahaoYao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants