-
Notifications
You must be signed in to change notification settings - Fork 483
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
[Builtins] Introduce 'HiddenValueOf' #4249
[Builtins] Introduce 'HiddenValueOf' #4249
Conversation
/benchmark |
Comparing benchmark results of 'ae5f8b3ff' (base) and '3a5140883' (PR)
|
/benchmark |
Comparing benchmark results of 'ae5f8b3ff' (base) and 'e418fc0bc' (PR)
|
/benchmark |
Comparing benchmark results of 'ae5f8b3ff' (base) and '7f4903e8e' (PR)
|
This reverts commit 7f4903e.
/benchmark |
Comparing benchmark results of 'ae5f8b3ff' (base) and '05db7ed2e' (PR)
|
/benchmark |
Comparing benchmark results of 'ae5f8b3ff' (base) and '26f5a2cfb' (PR)
|
@michaelpj so the best I can do here is 0-2% speedup, it seems. Not sure if it's worth the additional complexity. But having that |
I'm not quite sure I follow. You mean so we can have a cached memory usage computation in the value? but couldn't we do that arleady? I'm not sure I want flexibility that we don't currently use, and this is quite a bit more complicated... |
We can, but in a much less convenient way. Currently if you want to attach something to a type, you have to create a new type and put that one into the universe (and remove the old one). This is due to constants being stored in data ValueOf uni = forall a. ValueOf !(uni a) !a i.e. any value of a built-in type has to be stored as is without any annotations and the type of that value has to appear in the unvierse. With the current PR "what we can support" and "how things are represented" are decoupled, so it's easy to change the representation of a type without touching the universe at all. This is quite more flexible and allows us to change the internals without breaking any API. |
I vote to keep things simple unless we need the flexibility now. (Yes I'm a YAGNI person) |
Let's close that for now, it conflicts with everything anyway. |
A rebase of #4243, which was based on #4200.