![]() ![]() By just copying the function code to the spot you can skip that overhead. Most notably, trivial functions (like many in the c++ standard library) can be much cheaper than the code that deals with the function call itself. The compiler normally implements function calls by adding code that saves things that the call could destroy and then a branch instruction to the code of the called function.īy inlining you are telling the compiler to instead place a copy of the called function in place. Most notably, it will define the NDEBUG macro instead of the DEBUG macro, allowing the preprocessor to remove various debugging aids, such as range checks and assertions, that consumes time.Īnother thing this does is that it switches the runtime from the debugging version to the optimized release version. Set the compiler to use the release configuration instead of the debug configuration. In the project properties page of your client and server, change these settings to optimize your DLL files. 1.6 Whole Program Optimization / Link time code generation.
0 Comments
Leave a Reply. |