Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve inference in space constructors #1797

Open
charleskawczynski opened this issue Jun 12, 2024 · 1 comment
Open

Improve inference in space constructors #1797

charleskawczynski opened this issue Jun 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working Inference

Comments

@charleskawczynski
Copy link
Member

In particular, I'm seeing a bunch of jet failures in warpedspace of test/Spaces/terrain_warp.jl. We should probably add more systematic tests, as this can improve compile times.

@charleskawczynski
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Inference
Projects
None yet
Development

No branches or pull requests

1 participant