What exactly does GCC -fobjc-direct-dispatch do?

The GCC manual says:

-fobjc-direct-dispatch

Allow quick transitions to the message manager. On Darwin, this is done through the comm page.

Can this flag be considered to exclude dynamic sending? How it works? I believe this should be as fast as calling a C function if it is connected directly.

+3
source share
1 answer

No, dynamic dispatch still exists (calls still go through objc_msgSend). And this option does not present any difference at present with x86 (-64).

http://developer.apple.com/legacy/mac/library/documentation/DeveloperTools/gcc-3.3/gcc/Objective_002dC-Dialect-Options.html:

( objc_msgSend), Objective-C, , (, "bla" PowerPC) . fobjc-direct-dispatch . NeXT runtime; , , -fobjc-direct-dispatch, Mac OS X 10.4 (Tiger) .

+4

Source: https://habr.com/ru/post/1744615/


All Articles