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

implement toMapText and fromMapText as unsafeCoerce? #1086

Open
MangoIV opened this issue Feb 29, 2024 · 2 comments
Open

implement toMapText and fromMapText as unsafeCoerce? #1086

MangoIV opened this issue Feb 29, 2024 · 2 comments

Comments

@MangoIV
Copy link
Contributor

MangoIV commented Feb 29, 2024

It appears that Key has the same Ord instance as Text so I wonder what would be the issue with speeding up these two functions by using unsafeCoerce

@Lysxia
Copy link
Collaborator

Lysxia commented Mar 5, 2024

We can even keep it safe by just redefining KeyMap using Map Text

@MangoIV
Copy link
Contributor Author

MangoIV commented Mar 5, 2024

I mean it’s still safe, we’re just circumventing, for us, irrelevant roles. Surely though, just changing the key type would be good enough, if that was possible.

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

No branches or pull requests

2 participants