Re: [PR] Reduce overhead of commonly used logging macros [logging-log4cxx]
swebb2066 merged PR #337: URL: https://github.com/apache/logging-log4cxx/pull/337 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Reduce overhead of commonly used logging macros [logging-log4cxx]
swebb2066 commented on PR #337: URL: https://github.com/apache/logging-log4cxx/pull/337#issuecomment-1909148787 The new benchmarks for Windos are: | Benchmark | Time | CPU | Iterations | | | - | | | | Testing disabled logging request | 2.96 ns | 0.942 ns | 74667 | | Testing disabled logging request/threads:4 | 1.29 ns | 2.46 ns | 29868 | | Logging 5 char string using MessageBuffer, pattern: %m%n | 661 ns | 223 ns | 4072727 | | Logging 5 char string using MessageBuffer, pattern: %m%n/threads:4 | 382 ns | 785 ns | 1493332 | | Logging 49 char string using MessageBuffer, pattern: %m%n | 694 ns | 389 ns | 249 | | Logging 49 char string using MessageBuffer, pattern: %m%n/threads:4 | 424 ns | 1106 ns | 663704 | | Logging int value using MessageBuffer, pattern: %m%n | 1663 ns | 1032 ns | 112 | | Logging int value using MessageBuffer, pattern: %m%n/threads:4 | 697 ns | 1775 ns | 528168 | | Logging int+float using MessageBuffer, pattern: %m%n | 3300 ns | 1726 ns | 298667 | | Logging int+float using MessageBuffer, pattern: %m%n/threads:4 | 1216 ns | 2982 ns | 298668 | | Logging int value using MessageBuffer, pattern: [%d] %m%n | 1813 ns | 1134 ns | 896000 | | Logging int value using MessageBuffer, pattern: [%d] [%c] [%p] %m%n | 1652 ns | 938 ns | 100 | | Logging 49 char string using FMT, pattern: %m%n | 677 ns | 439 ns | 149 | | Logging 49 char string using FMT, pattern: %m%n/threads:4 | 423 ns | 854 ns | 128 | | Logging int value using FMT, pattern: %m%n | 633 ns | 393 ns | 187 | | Logging int value using FMT, pattern: %m%n/threads:4 | 422 ns | 963 ns | 1378460 | | Logging int+float using FMT, pattern: %m%n | 953 ns | 680 ns | 896000 | | Logging int+float using FMT, pattern: %m%n/threads:4 | 467 ns | 879 ns | 995556 | | Async, int value using MessageBuffer, pattern: %m%n | 1594 ns | 928 ns | 64 | | Async, int value using MessageBuffer, pattern: %m%n/threads:4 | 687 ns | 1445 ns | 40 | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Reduce overhead of commonly used logging macros [logging-log4cxx]
swebb2066 opened a new pull request, #337: URL: https://github.com/apache/logging-log4cxx/pull/337 The function scope static variable access in `Level::getInfo() `etc has unnecessary overhead (10% of logging a message). The new benchmarks for Ubuntu gcc 11 are: | Benchmark | Time | CPU | Iterations | | | -- | -- | --- | | Testing disabled logging request | 0.472 ns | 0.472 ns | 10 | | Testing disabled logging request/threads:16 | 0.094 ns | 1.01 ns | 676137360 | | Logging 5 char string using MessageBuffer, pattern: %m%n | 300 ns | 300 ns | 2327642 | | Logging 5 char string using MessageBuffer, pattern: %m%n/threads:16 | 511 ns | 4127 ns | 173408 | | Logging 49 char string using MessageBuffer, pattern: %m%n | 321 ns | 321 ns | 2163479 | | Logging 49 char string using MessageBuffer, pattern: %m%n/threads:16 | 500 ns | 4030 ns | 166160 | | Logging int value using MessageBuffer, pattern: %m%n | 512 ns | 512 ns | 1474939 | | Logging int value using MessageBuffer, pattern: %m%n/threads:16 | 449 ns | 3666 ns | 165344 | | Logging int+float using MessageBuffer, pattern: %m%n | 975 ns | 975 ns | 718422 | | Logging int+float using MessageBuffer, pattern: %m%n/threads:16 | 534 ns | 4401 ns | 176896 | | Logging int value using MessageBuffer, pattern: [%d] %m%n | 518 ns | 518 ns | 1348124 | | Logging int value using MessageBuffer, pattern: [%d] [%c] [%p] %m%n | 520 ns | 520 ns | 1333224 | | Logging 49 char string using FMT, pattern: %m%n | 314 ns | 314 ns | 2237700 | | Logging 49 char string using FMT, pattern: %m%n/threads:16 | 448 ns | 3624 ns | 206080 | | Logging int value using FMT, pattern: %m%n | 313 ns | 313 ns | 2235338 | | Logging int value using FMT, pattern: %m%n/threads:16 | 380 ns | 3039 ns | 239872 | | Logging int+float using FMT, pattern: %m%n | 463 ns | 463 ns | 1509341 | | Logging int+float using FMT, pattern: %m%n/threads:16 | 487 ns | 3924 ns | 208816 | | Async, int value using MessageBuffer, pattern: %m%n | 510 ns | 510 ns | 1484667 | | Async, int value using MessageBuffer, pattern: %m%n/threads:16 | 440 ns | 3579 ns | 193056 | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org