-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unbox small records #671
Comments
What about bigger primitives that aren't implemented by the language, such as complex numbers? Would such a target qualify for this optimization? |
Thanks for your question!
It doesn't matter how big the primitives in the language are because this optimization is totally internal and not actually limited to small records but also applicable to any multi-word values. We can just box or unbox big primitives on demand at boundaries if necessary (e.g. to box big primitives into "variant" types or to make big primitives FFI-safe.)
So yes! But of course, data transfer between Pen and foreign languages like Rust is another topic on optimization! |
Problem
Solution
type foo { x foo }
.type foo { x usize }
instead.new()
constructors automatically.References
The text was updated successfully, but these errors were encountered: