hitsedesen / value-or-exception

0 stars 0 forks source link

Run #1

Open hitsedesen opened 1 month ago

hitsedesen commented 1 month ago
hitsedesen@bench:~/value-or-exception/build$ g++ --version
g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0

cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja && ninja && ./bench

Run on (2 X 1995.31 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x2)
  L1 Instruction 32 KiB (x2)
  L2 Unified 4096 KiB (x1)
  L3 Unified 16384 KiB (x1)
Load Average: 0.92, 0.86, 0.44
-------------------------------------------------------------------
Benchmark                         Time             CPU   Iterations
-------------------------------------------------------------------
bench_error_as_value/0         91.8 ns         91.8 ns      7583046
bench_error_as_value/5         92.6 ns         92.6 ns      7618318
bench_error_as_value/10        92.4 ns         92.4 ns      7511266
bench_error_as_value/15        92.4 ns         92.4 ns      7409573
bench_error_as_value/20        92.5 ns         92.5 ns      7489621
bench_error_as_value/25        92.2 ns         92.2 ns      7500766
bench_error_as_value/30        92.8 ns         92.8 ns      7643591
bench_error_as_value/35        92.1 ns         92.1 ns      7530010
bench_error_as_value/40        91.9 ns         91.9 ns      7468061
bench_error_as_value/45        92.1 ns         92.1 ns      7724193
bench_error_as_value/50        92.7 ns         92.7 ns      7596756
bench_error_as_value/55        92.4 ns         92.4 ns      7584442
bench_error_as_value/60        92.5 ns         92.5 ns      7506923
bench_error_as_value/65        93.5 ns         93.5 ns      7399822
bench_error_as_value/70        92.8 ns         92.8 ns      7413692
bench_error_as_value/75        92.9 ns         92.9 ns      7515824
bench_error_as_value/80        91.4 ns         91.4 ns      7754879
bench_error_as_value/85        90.5 ns         90.5 ns      7647033
bench_error_as_value/90        90.0 ns         90.0 ns      7746370
bench_error_as_value/95        88.6 ns         88.6 ns      7784506
bench_error_as_value/100       87.9 ns         87.9 ns      7974644
bench_exceptions/0             18.7 ns         18.7 ns     38124165
bench_exceptions/5              210 ns          210 ns      3362307
bench_exceptions/10             398 ns          398 ns      1756402
bench_exceptions/15             602 ns          602 ns      1172925
bench_exceptions/20             772 ns          772 ns       892199
bench_exceptions/25             965 ns          965 ns       728778
bench_exceptions/30            1170 ns         1170 ns       604821
bench_exceptions/35            1351 ns         1351 ns       516922
bench_exceptions/40            1547 ns         1547 ns       461980
bench_exceptions/45            1737 ns         1737 ns       402586
bench_exceptions/50            1880 ns         1880 ns       364556
bench_exceptions/55            2087 ns         2087 ns       333725
bench_exceptions/60            2272 ns         2271 ns       311256
bench_exceptions/65            2449 ns         2448 ns       282842
bench_exceptions/70            2650 ns         2650 ns       265698
bench_exceptions/75            2797 ns         2797 ns       247075
bench_exceptions/80            2995 ns         2995 ns       233828
bench_exceptions/85            3187 ns         3187 ns       220699
bench_exceptions/90            3360 ns         3359 ns       204946
bench_exceptions/95            3550 ns         3550 ns       194498
bench_exceptions/100           3749 ns         3748 ns       187881

cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja -DCALL_STACK_SIZE=1000 && ninja && ./bench

Run on (2 X 1995.31 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x2)
  L1 Instruction 32 KiB (x2)
  L2 Unified 4096 KiB (x1)
  L3 Unified 16384 KiB (x1)
Load Average: 3.08, 1.85, 0.96
-------------------------------------------------------------------
Benchmark                         Time             CPU   Iterations
-------------------------------------------------------------------
bench_error_as_value/0        18325 ns        18318 ns        38079
bench_error_as_value/5        18351 ns        18349 ns        38810
bench_error_as_value/10       18354 ns        18352 ns        38479
bench_error_as_value/15       18318 ns        18318 ns        38787
bench_error_as_value/20       18361 ns        18356 ns        38093
bench_error_as_value/25       18226 ns        18221 ns        38289
bench_error_as_value/30       18617 ns        18612 ns        38372
bench_error_as_value/35       18429 ns        18424 ns        37727
bench_error_as_value/40       18383 ns        18377 ns        38175
bench_error_as_value/45       18412 ns        18400 ns        37588
bench_error_as_value/50       18424 ns        18419 ns        38295
bench_error_as_value/55       18419 ns        18417 ns        37996
bench_error_as_value/60       18674 ns        18673 ns        37818
bench_error_as_value/65       18363 ns        18361 ns        38047
bench_error_as_value/70       18342 ns        18341 ns        37966
bench_error_as_value/75       18327 ns        18327 ns        37732
bench_error_as_value/80       18413 ns        18412 ns        38271
bench_error_as_value/85       18375 ns        18374 ns        38179
bench_error_as_value/90       18484 ns        18482 ns        38267
bench_error_as_value/95       18349 ns        18348 ns        38267
bench_error_as_value/100      18296 ns        18295 ns        37477
bench_exceptions/0            15737 ns        15736 ns        44942
bench_exceptions/5            30530 ns        30528 ns        23255
bench_exceptions/10           45283 ns        45280 ns        15893
bench_exceptions/15           59314 ns        59309 ns        12300
bench_exceptions/20           73066 ns        73062 ns         9351
bench_exceptions/25           84087 ns        84083 ns         8430
bench_exceptions/30          102342 ns       102334 ns         7047
bench_exceptions/35          118644 ns       118635 ns         6383
bench_exceptions/40          129658 ns       129648 ns         5163
bench_exceptions/45          143083 ns       143075 ns         5063
bench_exceptions/50          162617 ns       162604 ns         4596
bench_exceptions/55          176854 ns       176842 ns         4137
bench_exceptions/60          190234 ns       190218 ns         3509
bench_exceptions/65          199494 ns       199488 ns         3605
bench_exceptions/70          214248 ns       214237 ns         3268
bench_exceptions/75          233647 ns       233636 ns         3087
bench_exceptions/80          245504 ns       245494 ns         2848
bench_exceptions/85          256524 ns       256513 ns         2747
bench_exceptions/90          270350 ns       270337 ns         2610
bench_exceptions/95          288979 ns       288966 ns         2457
bench_exceptions/100         297463 ns       297452 ns         2317
hitsedesen commented 1 month ago

RelWithDebinfo

0000000000403120 <get_result_8()>:
  403120:   48 83 ec 18             sub    rsp,0x18
  403124:   e8 57 00 00 00          call   403180 <get_result_9()>
  403129:   48 89 c2                mov    rdx,rax
  40312c:   48 89 04 24             mov    QWORD PTR [rsp],rax
  403130:   31 c0                   xor    eax,eax
  403132:   48 c1 ea 20             shr    rdx,0x20
  403136:   84 d2                   test   dl,dl
  403138:   74 0f                   je     403149 <get_result_8()+0x29>
  40313a:   8b 04 24                mov    eax,DWORD PTR [rsp]
  40313d:   83 c0 01                add    eax,0x1
  403140:   89 44 24 08             mov    DWORD PTR [rsp+0x8],eax
  403144:   b8 01 00 00 00          mov    eax,0x1
--
0000000000403160 <get_result_or_throw_8()>:
  403160:   48 83 ec 08             sub    rsp,0x8
  403164:   e8 77 00 00 00          call   4031e0 <get_result_or_throw_9()>
  403169:   48 83 c4 08             add    rsp,0x8
  40316d:   83 c0 01                add    eax,0x1
  403170:   c3                      ret
  403171:   66 2e 0f 1f 84 00 00    cs nop WORD PTR [rax+rax*1+0x0]
  403178:   00 00 00 
  40317b:   0f 1f 44 00 00          nop    DWORD PTR [rax+rax*1+0x0]