this post was submitted on 24 Sep 2026
48 points (100.0% liked)

Rust

8304 readers
42 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS
 

See also the discussion for Klabnik's Arguing about arguments

you are viewing a single comment's thread
view the rest of the comments
[โ€“] BB_C@programming.dev 4 points 1 week ago

Remember that this has no runtime cost and is fully type-safe.

For the sake of maximal accuracy, enum size overhead can become relevant sometimes. But a work-around exists (boxing the huge variant), and with or without boxing, the performance would still beat whatever other languages have to offer.

Otherwise, good post (I would have to say that since it mostly rehashes points I made in previous comments ๐Ÿ˜‰).