[Bug c/31396] Inline code performance much worse than out-of-line

jamagallon at ono dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 29 22:17:00 GMT 2007



------- Comment #1 from jamagallon at ono dot com  2007-03-29 23:17 -------
Created an attachment (id=13298)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13298&action=view)
testcase

Simple test case with a loop in main() and a call to a function.
Both just calculate the sum of all elements on a vector.
The code in main() is muuch slower that the function.
If the function is inlined (-DINLINE), it becomes equally slower.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31396



More information about the Gcc-bugs mailing list