See a block of code in the function today
Static inline nsstring * afimagecachekeyfromurlrequest (nsurlrequest *request) {
return [[Request URL]absolutestring];
}
This is a C-language function call when it is used directly
Function name: (parameter)
Method call
About the interpretation of inline
1. Inline functions reduce the overhead of the CPU, and the overall speed of the program is accelerated, but when the inline function is large, it has the opposite effect, so the generally smaller function uses the inline function.
2. There are two methods of declaring inline functions, one is to use the inline closing word before the function, and the other is to define the code of the function inside the class, so that the function is automatically converted to an inline function, and there is no need to put the inline in front of the function.
3. Inline is a request to the compiler, and the following conditions prevent the compiler from obeying the request.
If the function contains a loop, switch or goto statement, a recursive function that contains static functions.
Inux's father Linus said "static inline" means "we have the This function, if you use it, but don ' t" inline it, then make a static Version of it in this compilation unit ". "extern inline" means "I actually _have_ an extern for this function, and if you want-to-inline it, here's the Inline-vers Ion ".
When the compiler discovers that a piece of code calls an inline function, it does not call the function, but instead inserts the code of the function into the current position. The benefit of this is that the process of calling is omitted and the program runs faster.
On the interpretation of inline functions