Re:Inheritance was invented as a performance hack
by Twisol on Friday April 30, 2021 @11:31AM
(#26994743)
Trait objects (via `dyn`) are virtual dispatching, but traits themselves are basically agnostic to static vs. virtual dispatch. If you use a trait method through a statically known type, the method is invoked statically -- no runtime lookup.
[ Parent
| on HN ]
There are no comments on this comment yet.