Open Quuxplusone opened 3 years ago
clang_expensive_error_handling.cpp
Created attachment 25012 File with code in issue
Hi, i noticed this unusual behaviour of exception-throwing system.
This is small analysis of Storage::StorageRecord* Storage::find function most expensive operations from my project (full code available in file below):
Storage::StorageRecord* Storage::find
flags: -std=c++1z -O1 -fno-stack-protector ldflags: <none> сlang++ - QtCreator profiler: __cxa_throw cost (instruction read access): 171,241,920 |__ _Unwind_RaiseException cost (instruction read access): 170,541,920 g++ - QtCreator profiler: __cxa_throw cost (instruction read access): 133,161,906 |__ _Unwind_RaiseException: cost (instruction read access): 132,541,906
You can see, that performance difference between GCC and Clang almost 30%.
I think, for same optimization level Clang's exception-throwing costs are too high compared to GCC.
Thank you for your attention.
Attached clang_expensive_error_handling.cpp (5974 bytes, text/x-c++src): File with code in issue
clang_expensive_error_handling.cpp
(5974 bytes, text/x-c++src)Created attachment 25012 File with code in issue
Hi, i noticed this unusual behaviour of exception-throwing system.
This is small analysis of
Storage::StorageRecord* Storage::find
function most expensive operations from my project (full code available in file below):You can see, that performance difference between GCC and Clang almost 30%.
I think, for same optimization level Clang's exception-throwing costs are too high compared to GCC.
Thank you for your attention.