Closed Jordan-Dennis closed 1 year ago
Here is another example, This one actually blows my mind.
So Jake Vanderpass suggested (not strictly speaking) against this and said to "trust the compiler". When I suggested it I was under the impression that the jaxpr
roughly translated into runtime performance, but Jake said this is not the case. It is still nice to have a fine level of control over the jaxpr
(still an important step) since using primitives is almost one to one. However, for the most case I don't think we need to go that far.
Hi all, Based on the contents of #169 we can improve the performance by lowering our code nearer to
lax
. The amount to which this is effective will, I think, vary. In most casesjax
does all the lowering itself giving so it will not be worth the effort but in other cases I think it will give us better performance. For example, consider my MWE usingnp.linspace
below. This is a micro-optimisation, but when we are using the coordinates function as much as we do something like this might be handy.Regards Jordan