inlining

Styopa Semenukha semenukha at gmail.com
Fri Feb 14 22:50:44 UTC 2014


I suppose they will be inlined at -O2 level:
http://linux.die.net/man/1/gcc

-finline-small-functions
Integrate functions into their callers when their body is smaller than expected function call code (so overall size of program gets smaller). The compiler heuristically decides which functions are simple enough to be worth integrating in this way.
Enabled at level -O2.

On Friday, February 14, 2014 04:59:26 PM atarob wrote:
> Looking through the codebase, I see a lot of very short helper like
> functions that are defined in .c files with prototypes in .h files. This
> means that the compiler cannot inline them outside of that .c file. Am I
> wrong?  How is that not a performance hit?
> 
> Ata.
> 
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,247575,247575#msg-247575
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-- 
Best regards,
Styopa Semenukha.



More information about the nginx mailing list