My program work fast, after changing is two times slower.
I try profile with perf under CLion.
Most time consuming method is [Unknown][Unknown]
what it is?
My changes are big because intermediate versions not works at all, only compiled. New version seems to be work the same, but is slower. New version is preparation for threads.I don't use thread yet.
I thnink "unknown" is not method but all time, main is called from unknown.
But I don't know yet why is slower.
I know!
Small method was called billion times. Previously was inlined , but now compiler can't inline because this method and its caller was on different .cpp files. Now is faster than previous version!
That's expected. main() is called from the startup code. What matters is what main() calls, not what calls main(). After all, the entire program is inside a call to main().
Small method was called billion times.
That's a lot. You might need a better algorithm. The good news is that sometimes a better algorithm can have a dramatic affect on the program's performance.