Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Exception Cost Test - C++

Author

anonymous

about 2 years ago

Language

C++

Compiler

clang 15.0.7

Options
Warnings
Boost 1.80.0
C++2b(GNU)
no pedantic

Exception Cost Test - C++

Author

anonymous

about 2 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.80.0-clang-15.0.7/include -std=gnu++2b
prog.cc:52:9: warning: unused variable 'exceptions' [-Wunused-variable]
    int exceptions = 0;
        ^
1 warning generated.
measureNoExceptionCost: NoExceptions: 1000000, Duration: 5.62596 ms
measureExceptionCost: Probability: 0%, Exceptions: 0, NoExceptions: 1000000, Duration: 5.58457 ms
measureExceptionCost: Probability: 1%, Exceptions: 9990, NoExceptions: 990010, Duration: 18.4652 ms
measureExceptionCost: Probability: 99%, Exceptions: 990056, NoExceptions: 9944, Duration: 1213.75 ms
Exit Code:
0