Replies: 1 comment
-
|
Would it be feasible to optimize this as a special case (record with one |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The impure collections wrap the pure collections in a single field object with a mutable field. That actually has more overhead than one would like in the current compiler (a boxed record with a named, boxed field). Perhaps it would be worth introducing a new stable ref type that just requires one indirection (not two) an always has constant time access rather than requiring a field lookup.
Unfortunately, doing this means adding a new representation to motoko values (i,e, a new tag similar to MutBox unless we just use MutBox for both fields and ref types).
Beta Was this translation helpful? Give feedback.
All reactions