-
Notifications
You must be signed in to change notification settings - Fork 2
Function compilations
MetanoKid edited this page Jun 25, 2020
·
2 revisions
In this page we'll explore which info you can get from the FunctionCompilations.csv
report.
If we were to check the sample file provided in the repo we would find something like this:
Undecorated function name | Average elapsed time (nanoseconds) | Minimum elapsed time (nanoseconds) | Maximum elapsed time (nanoseconds) | Standard deviation (nanoseconds) | Occurrences |
---|---|---|---|---|---|
void * __ptr64 __cdecl operator new(unsigned __int64,void * __ptr64) |
9886794 | 207600 | 89488000 | 27283727 | 18 |
unsigned __int64 __cdecl std::_Get_size_of_n<16>(unsigned __int64) |
8058894 | 263000 | 69892400 | 21849490 | 18 |
void __cdecl std::_Deallocate<16,0>(void * __ptr64,unsigned __int64) |
4164733 | 279800 | 69553600 | 15859163 | 18 |
... | ... | ... | ... | ... | ... |
Similar to other reports, we get the average time and related metrics.
Remember: functions are getting compiled in parallel, so adding individual occurrences together wouldn't yield a valid total.
Having a function that gets compiled many times and takes a high average should hint you for improvements.
Say you've found some function whose impact in the build you want to improve. Ask yourself some questions:
- Should it be compiled these many times, at all? Maybe it's a default constructor provided by the compiler and you could implement one yourself in the
.cpp
file. - Should it take this long? Maybe you're performing a lot of compile-time operations.