Skip to content
Discussion options

You must be logged in to vote

Hello - this is entirely expected behavior for microbenchmarks of small, individual operations like reshape, though it will not generally result in slower execution when the reshape is used in more realistic situations (i.e. a sequence of JIT-compiled operations). For information on why this may be expected, see FAQ: Is JAX Faster Than NumPy?.

Also, when writing microbenchmarks like this with JAX, you need to be careful about effects of asynchronous dispatch, data transfer, and other issues. For more information on how to write good microbenchmarks, see FAQ: Benchmarking JAX Code.

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
4 replies
@Chi-RZ
Comment options

@YouJiacheng
Comment options

@Chi-RZ
Comment options

@YouJiacheng
Comment options

Comment options

You must be logged in to vote
3 replies
@Chi-RZ
Comment options

@jakevdp
Comment options

@Chi-RZ
Comment options

Answer selected by Chi-RZ
Comment options

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

@YouJiacheng
Comment options

@Chi-RZ
Comment options

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