当前位置:网站首页>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边栏推荐
- When to use useImperativeHandle, useLayoutEffect, and useDebugValue
- Idea rundashboard window configuration
- Live tiktok shop 2022 latest gameplay card slot overseas live e-commerce new traffic
- LeetCode102. Sequence traversal of binary tree (output by layer and unified output)
- Three. Js-01 getting started
- Southeast Asia e-commerce guide, how do sellers layout the Southeast Asia market?
- Use of grpc interceptor
- Neural structured learning - Part 2: training with natural graphs
- Difference between out of band and in band
- How to enable relationship view in phpMyAdmin - how to enable relationship view in phpMyAdmin
猜你喜欢

Spécifications techniques et lignes directrices pour la sélection des tubes TVS et ESD - Recommandation de jialichuang

CIS基准测试工具kube-bench使用
![[original] what is the core of programmer team management?](/img/11/d4b9929e8aadcaee019f656cb3b9fb.png)
[original] what is the core of programmer team management?

【经典控制理论】自控实验总结

Use of grpc interceptor

Technical specifications and model selection guidelines for TVs tubes and ESD tubes - recommended by jialichuang

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

Initial experience | purchase and activate typora software

两数之和、三数之和(排序+双指针)

Registration of Electrical Engineering (elementary) examination in 2022 and the latest analysis of Electrical Engineering (elementary)
随机推荐
Technical specifications and model selection guidelines for TVs tubes and ESD tubes - recommended by jialichuang
How to design API return code (error code)?
How to enable relationship view in phpMyAdmin - how to enable relationship view in phpMyAdmin
TypeError: this. getOptions is not a function
派对的最大快乐值
14种神笔记方法,只需选择1招,让你的学习和工作效率提高100倍!
yate.conf
Hj16 shopping list
Mathematical formula screenshot recognition artifact mathpix unlimited use tutorial
Golang code checking tool
Three. JS VR house viewing
基于脉冲神经网络的物体检测
When to use useImperativeHandle, useLayoutEffect, and useDebugValue
Getting started stm32--gpio (running lantern) (nanny level)
代码农民提高生产力
Design and implementation of secsha system
Difference between out of band and in band
What is the process of building a website
Three. Js-01 getting started
LeetCode102. Sequence traversal of binary tree (output by layer and unified output)