当前位置:网站首页>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边栏推荐
- 动态规划 之 打家劫舍
- C# Linq Demo
- (4) UART application design and simulation verification 2 - RX module design (stateless machine)
- It is proved that POJ 1014 module is optimized and pruned, and some recursion is wrong
- Development specification: interface unified return value format [resend]
- Southeast Asia e-commerce guide, how do sellers layout the Southeast Asia market?
- Spécifications techniques et lignes directrices pour la sélection des tubes TVS et ESD - Recommandation de jialichuang
- CIS基准测试工具kube-bench使用
- 基于脉冲神经网络的物体检测
- grafana工具界面显示报错influxDB Error
猜你喜欢

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

TypeError: this. getOptions is not a function

Marginal probability and conditional probability

视频标准二三事

Debian 10 installation configuration

Brushless drive design -- on MOS drive circuit

Dynamic planning: robbing families and houses

LeetCode102. Sequence traversal of binary tree (output by layer and unified output)

2:第一章:认识JVM规范1:JVM简介;

Mathematical formula screenshot recognition artifact mathpix unlimited use tutorial
随机推荐
AsyncSocket长连接棒包装问题解决
CJ mccullem autograph: to dear Portland
Live tiktok shop 2022 latest gameplay card slot overseas live e-commerce new traffic
2022 G3 boiler water treatment simulation examination and G3 boiler water treatment simulation examination question bank
秒杀系统的设计与实现思路
Non rigid / flexible point cloud ICP registration
Rethinking about MySQL query optimization
(4)UART应用设计及仿真验证2 —— TX模块设计(无状态机)
Use the rewrite rule to rewrite all accesses to the a domain name to the B domain name
98. 验证二叉搜索树 ●●
Hj16 shopping list
Multi view 3D reconstruction
Neural structured learning - Part 2: training with natural graphs
Différence entre hors bande et en bande
Douban scoring applet Part-2
Marginal probability and conditional probability
Leetcode buys and sells stocks
2022.6.20-6.26 AI行业周刊(第103期):新的小生命
Design and implementation of secsha system
【经典控制理论】自控实验总结