当前位置:网站首页>Objective C message dispatch mechanism
Objective C message dispatch mechanism
2022-07-05 23:26:00 【javail】
problem :
I am just staring to play around with Objective C (writing toy iPhone apps) and I am curious about the underlying mechanism used to dispatch messages. I just want to play Objective C( Writing toys iPhone Applications ), I'm curious about the underlying mechanism for sending messages .I have a good understanding of how virtual functions in C++ are generally implemented and what the costs are relative to a static or non-virtual method call, but I don't have any background with Obj-C to know how messages are sent. I know very well C++ How to implement virtual functions in , And the cost relative to static or non virtual method calls , But I don't have any Obj-C Background to understand how messages are sent .Browsing around I found this loose benchmark and it mentions IMP cached messages being faster than virtual function calls, which are in turn faster than a standard message send. When browsing, I found This Loose benchmarks , It refers to IMP Cached messages are faster than virtual function calls , Virtual function calls are faster than standard messages .
I am not trying to optimize anything, just get deeper understanding of how exactly the messages get dispatched. I'm not trying to optimize anything , Just learn more about how messages are sent .
- How are Obj-C messages dispatched?Obj-C How messages are sent ?
- How do Instance Method Pointers get cached and can you (in general) tell by reading the code if a message will get cached? How instance method pointers are cached , Can you ( Usually ) Read the code to determine whether a message will be cached ?
- Are class methods essentially the same as a C function (or static class method in C++), or is there something more to them? Class methods are essentially the same as C function ( or C++ Static class methods in ) identical , Or do they have more things ?
I know some of these questions may be 'implementation dependent' but there is only one implementation that really counts. I know some of these problems may “ Depend on the realization ”, But only one implementation is really important .
Solution :
Reference resources : https://stackoom.com/en/question/47Ua边栏推荐
- UVA – 11637 garbage remembering exam (combination + possibility)
- Go language implementation principle -- lock implementation principle
- [Yu Yue education] NC machining technology reference materials of Shaanxi University of science and technology
- 2022.6.20-6.26 AI行业周刊(第103期):新的小生命
- 14种神笔记方法,只需选择1招,让你的学习和工作效率提高100倍!
- Idea rundashboard window configuration
- Object detection based on impulse neural network
- yate.conf
- 2022 G3 boiler water treatment simulation examination and G3 boiler water treatment simulation examination question bank
- February 13, 2022 -5- maximum depth of binary tree
猜你喜欢

Hainan Nuanshen tea recruits warmhearted people: recruitment of the product experience recommender of Nuanshen multi bubble honey orchid single cluster

2022 R2 mobile pressure vessel filling review simulation examination and R2 mobile pressure vessel filling examination questions

Detailed explanation of pointer and array written test of C language

开关电源Buck电路CCM及DCM工作模式

Xinyuan & Lichuang EDA training camp - brushless motor drive

Technical specifications and model selection guidelines for TVs tubes and ESD tubes - recommended by jialichuang
![[classical control theory] summary of automatic control experiment](/img/22/9c9e107da7e305ce0a57d55b4d0b5a.png)
[classical control theory] summary of automatic control experiment

TVS管和ESD管的技術指標和選型指南-嘉立創推薦

Registration of Electrical Engineering (elementary) examination in 2022 and the latest analysis of Electrical Engineering (elementary)

2022 registration examination for safety management personnel of hazardous chemical business units and simulated reexamination examination for safety management personnel of hazardous chemical busines
随机推荐
Fix the memory structure of JVM in one article
Rethinking about MySQL query optimization
(4) UART application design and simulation verification 2 - RX module design (stateless machine)
Difference between out of band and in band
Selenium+pytest automated test framework practice
2022 registration examination for safety management personnel of hazardous chemical business units and simulated reexamination examination for safety management personnel of hazardous chemical busines
证明 poj 1014 模优化修剪,部分递归 有错误
Scala concurrent programming (II) akka
Calculating the number of daffodils in C language
2022.6.20-6.26 AI行业周刊(第103期):新的小生命
帶外和帶內的區別
npm ELECTRON_ Mirror is set as domestic source (npmmirror China mirror)
6-axis and 9-axis IMU attitude estimation
两数之和、三数之和(排序+双指针)
The PNG image is normal when LabVIEW is opened, and the full black image is obtained when Photoshop is opened
进击的技术er——自动化
(4)UART应用设计及仿真验证2 —— TX模块设计(无状态机)
【经典控制理论】自控实验总结
grafana工具界面显示报错influxDB Error
poj 2762 Going from u to v or from v to u? (infer whether it is a weak link diagram)