Open charleskawczynski opened 3 months ago
It turns out that a big culprit here is the OBJECT_CACHE
, which is inherently type stable since it takes a type-unbounded dict.
IMO, this is not really the correct way to test if two spaces are compatible (and won't generally work, even for the coupler). Removing the get!
-OBJECT_CACHE
logic from all the constructors fixes a huge number of type instabilities, ironically speeding up the construction of the space. Subsequent calls can be faster, but I'm wondering if this is worth it
In particular, I'm seeing a bunch of jet failures in
warpedspace
oftest/Spaces/terrain_warp.jl
. We should probably add more systematic tests, as this can improve compile times.