Closed mtbc closed 2 years ago
With the 32-bit version of the straight guide, for the tests' np.allclose
I needed to downgrade the default atol
by a couple of orders of magnitude. Presumably this gets even worse for a more numerically complex path.
As one might expect, without the described changes, this PR doesn't much change execution speed nor register count.
In experiments this morning, I'm finding that the described steps to drop to 32-bit slightly increase register count while improving speed by more than a third, so I'll add a commit here to do that and we'll see if the CI tests still pass.
Adds explicit rather than inferred type signatures to make it easier to experiment with 32-bit imprecision. With this in, all one need do for such an experiment is:
float64
tofloat32
.t2
and after takingt3
, useneutron_array.astype(np.float32)
andneutron_array.astype(np.float64)
to convert the array of neutrons.