compiler option
-
hi, What is your opinion about the expand 'any suitable' function inline ? Will that cause any problem ? why does the compiler issue warnings while compiling with that option ? regards..... Hari Krishnan
-
hi, What is your opinion about the expand 'any suitable' function inline ? Will that cause any problem ? why does the compiler issue warnings while compiling with that option ? regards..... Hari Krishnan
'Any suitable' basically means that the compiler gets to look at every function you wrote and decide whether to inline it. Basically it tries to see whether the cost of inlining the function is more or less than the cost of not doing so - if less, it will probably inline it. The problem will likely be that your code size will be very large. Most references actually recommend trying to minimize code size in the general case, because more code = more working set = more page faults, typically. A page fault can swamp any benefit you might get from code that would be faster if it had all been in RAM at the same time. As for the warnings, I have no idea, since I've never used this option. Post a list of the warnings! :-D -- Mike Dimmick
-
'Any suitable' basically means that the compiler gets to look at every function you wrote and decide whether to inline it. Basically it tries to see whether the cost of inlining the function is more or less than the cost of not doing so - if less, it will probably inline it. The problem will likely be that your code size will be very large. Most references actually recommend trying to minimize code size in the general case, because more code = more working set = more page faults, typically. A page fault can swamp any benefit you might get from code that would be faster if it had all been in RAM at the same time. As for the warnings, I have no idea, since I've never used this option. Post a list of the warnings! :-D -- Mike Dimmick
thanks. i better try to minimize code size Hari Krishnan