15.01.2017, 13:57
Hey,
I have made myself a little Benchmarking macro recently, but it is causing loose identation warnings, which is quite annoying. I'd appreciate if someone could explain why that happens, here is the macro:
If anyone wonders about the first and the last bracket, it is to prevent variable shadowing.
greetings marcel
I have made myself a little Benchmarking macro recently, but it is causing loose identation warnings, which is quite annoying. I'd appreciate if someone could explain why that happens, here is the macro:
PHP код:
#define BENCHMARK(%0,%1,%2); \
{\
new startTick = GetTickCount();\
for(new count = 0; count < %1; count++)\
{\
%0;\
}\
new endTick = GetTickCount();\
printf("%s: %dms in %d iterations", %2, endTick - startTick, %1);\
}
greetings marcel