Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Dynamic dispatch
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==References== {{reflist|refs= <ref name="Milton-Schmidt_1994">{{cite tech report |title=Dynamic Dispatch in Object-Oriented Languages |author-first1=Scott |author-last1=Milton |author-first2=Heinz W. |author-last2=Schmidt |volume=TR-CS-94-02 |institution=Australian National University |date=1994 |citeseerx=10.1.1.33.4292}}</ref> <ref name="Driesen-Hoelzle-Vitek_1995">{{cite conference |title=Message Dispatch on Pipelined Processors |author-first1=Karel |author-last1=Driesen |author-first2=Urs |author-last2=Hölzle |author-first3=Jan |author-last3=Vitek |book-title=ECOOP’95 — Object-Oriented Programming, 9th European Conference, Åarhus, Denmark, August 7–11, 1995 |series=Lecture Notes in Computer Science |volume=952 |publisher=Springer |doi=10.1007/3-540-49538-X_13 |isbn=3-540-49538-X |date=1995 |citeseerx=10.1.1.122.281}}</ref> <ref name="Mueller_1995">{{cite thesis |title=Message Dispatch in Dynamically-Typed Object-Oriented Languages |date=1995 |author-first=Martin |author-last=Müller |type=Master thesis |institution=University of New Mexico |pages=16–17 |citeseerx=10.1.1.55.1782}}</ref> <ref name="Klabnik-Nichols_2023">{{cite book |title=The Rust Programming Language |chapter=17. Object-oriented programming features |date=2023 |orig-date=2018<!-- 1st edition --> |edition=2 |author-first1=Steve |author-last1=Klabnik |author-first2=Carol |author-last2=Nichols |publisher=[[No Starch Press, Inc.]] |publication-place=San Francisco, California, USA |isbn=978-1-7185-0310-6 <!-- |lccn=1st edition: 2018014097 --> |pages=375–396 [379–384] |quote-page=384 |quote=Trait objects perform dynamic dispatch […] When we use trait objects, Rust must use dynamic dispatch. The compiler doesn't know all the types that might be used with the code that's using trait objects, so it doesn't know which method implemented on which type to call. Instead, at runtime, Rust uses the pointers inside the trait object to know which method to call. This lookup incurs a runtime cost that doesn't occur with static dispatch. Dynamic dispatch also prevents the compiler from choosing to inline a method's code, which in turn prevents some optimizations.}} (xxix+1+527+3 pages)</ref> }}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)