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

avoid specializing convert for Any result types (superseding #25) #27

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

0x0f0f0f
Copy link
Owner

  • avoid specializing convert for Any result types
  • adjust tests

stev47 and others added 2 commits August 4, 2023 11:27
Specializing `convert(Result{Any, E}, x)` for every type of `x` can
incur substantial compilation overhead (not only on `convert` but also
on `Some`). This change avoids specializing in case of explicit `Any`
result type.

This is analogous to Julia Base where we have
```
convert(::Type{Any}, Core.@nospecialize x) = x
```
to avoid excessive specialization.
@0x0f0f0f 0x0f0f0f merged commit 89175a4 into master Jul 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants