Commit 43806070 authored by Raphael Rieu-Helft's avatar Raphael Rieu-Helft

add mini-gmp to benchmarks

parent fb5aefde
......@@ -5,7 +5,9 @@ extract: why3
why3 extract -D c -D mp.drv -o build/N.c -L . mp2.N
tests: extract check-gmp
gcc -O3 -Wall -g -std=gnu99 tests.c build/N.c -I$(GMP_DIR) -L$(GMP_LIB) -fno-tree-vectorize -lgmp -o tests
gcc -O3 -Wall -g -std=gnu99 -DCOMPARE_MINI tests.c build/N.c -I$(GMP_DIR) -fno-tree-vectorize -o minitests
./tests
./minitests
why3addbench: extract check-gmp
gcc -O3 -Wall -g -std=gnu99 -DTEST_WHY3 -DTEST_ADD tests.c build/N.c -I$(GMP_DIR) -L$(GMP_LIB) -fno-tree-vectorize -lgmp -o why3addbench
why3mulbench: extract check-gmp
......@@ -18,8 +20,15 @@ gmpmulbench: extract check-gmp
gcc -O3 -Wall -g -std=gnu99 -DTEST_GMP -DTEST_MUL tests.c build/N.c -I$(GMP_DIR) -L$(GMP_LIB) -fno-tree-vectorize -lgmp -o gmpmulbench
gmpdivbench: extract check-gmp
gcc -O3 -Wall -g -std=gnu99 -DTEST_GMP -DTEST_DIV tests.c build/N.c -I$(GMP_DIR) -L$(GMP_LIB) -fno-tree-vectorize -lgmp -o gmpdivbench
minigmpaddbench: extract
gcc -O3 -Wall -g -std=gnu99 -DTEST_MINIGMP -DTEST_ADD tests.c build/N.c -I$(GMP_DIR) -fno-tree-vectorize -o minigmpaddbench
minigmpmulbench: extract
gcc -O3 -Wall -g -std=gnu99 -DTEST_MINIGMP -DTEST_MUL tests.c build/N.c -I$(GMP_DIR) -fno-tree-vectorize -o minigmpmulbench
minigmpdivbench: extract
gcc -O3 -Wall -g -std=gnu99 -DTEST_MINIGMP -DTEST_DIV tests.c build/N.c -I$(GMP_DIR) -fno-tree-vectorize -o minigmpdivbench
alltests: tests why3addbench why3mulbench why3divbench gmpaddbench gmpmulbench gmpdivbench
alltests: tests why3addbench why3mulbench why3divbench gmpaddbench gmpmulbench gmpdivbench minigmpaddbench minigmpmulbench minigmpdivbench
data: alltests
./why3addbench > bench/why3add
......@@ -28,12 +37,22 @@ data: alltests
./gmpaddbench > bench/gmpadd
./gmpmulbench > bench/gmpmul
./gmpdivbench > bench/gmpdiv
./minigmpaddbench > bench/minigmpadd
./minigmpmulbench > bench/minigmpmul
./minigmpdivbench > bench/minigmpdiv
plots: data
./divplot &
./divrelative &
./mulrelative &
./addrelative &
./addplot &
./minidivrelative &
./minimulrelative &
./miniaddrelative &
./gmpdiv &
./gmpmul &
./gmpadd &
check-gmp:
ifndef GMP_DIR
......
#an bn t(s)
2 1 0.022573
2 2 0.014467
3 1 0.020099
3 2 0.016140
3 3 0.012422
4 1 0.013557
4 2 0.016024
4 3 0.014332
4 4 0.010013
5 1 0.006615
5 2 0.008450
5 3 0.010526
5 4 0.009952
5 5 0.009026
6 1 0.007113
6 2 0.007826
6 3 0.009633
6 4 0.011293
6 5 0.010920
6 6 0.010456
7 1 0.007467
7 2 0.008363
7 3 0.009264
7 4 0.010663
7 5 0.012311
7 6 0.012245
7 7 0.011882
8 1 0.007481
8 2 0.008669
8 3 0.009742
8 4 0.010469
8 5 0.012038
8 6 0.013538
8 7 0.013278
8 8 0.012870
9 1 0.007229
9 2 0.008394
9 3 0.009734
9 4 0.010426
9 5 0.011385
9 6 0.012980
9 7 0.014637
9 8 0.014396
9 9 0.014004
10 1 0.007566
10 2 0.008406
10 3 0.009731
10 4 0.010596
10 5 0.011740
10 6 0.012782
10 7 0.014293
10 8 0.015885
10 9 0.015837
10 10 0.015522
11 1 0.007919
11 2 0.008727
11 3 0.009724
11 4 0.010641
11 5 0.011888
11 6 0.013235
11 7 0.014413
11 8 0.015840
11 9 0.017423
11 10 0.017226
11 11 0.016639
12 1 0.007917
12 2 0.009068
12 3 0.010077
12 4 0.010892
12 5 0.012259
12 6 0.013577
12 7 0.014721
12 8 0.015407
12 9 0.017035
12 10 0.018588
12 11 0.018427
12 12 0.017972
13 1 0.007980
13 2 0.009061
13 3 0.010409
13 4 0.010932
13 5 0.011933
13 6 0.013418
13 7 0.014694
13 8 0.016086
13 9 0.017088
13 10 0.018260
13 11 0.019739
13 12 0.019934
13 13 0.019560
14 1 0.007882
14 2 0.009181
14 3 0.010409
14 4 0.011541
14 5 0.012550
14 6 0.013574
14 7 0.014678
14 8 0.016269
14 9 0.017114
14 10 0.018450
14 11 0.019923
14 12 0.021161
14 13 0.021259
14 14 0.020693
15 1 0.007875
15 2 0.009067
15 3 0.010406
15 4 0.011544
15 5 0.012774
15 6 0.013839
15 7 0.014581
15 8 0.015898
15 9 0.017561
15 10 0.018527
15 11 0.019764
15 12 0.021097
15 13 0.022551
15 14 0.022404
15 15 0.022029
16 1 0.007898
16 2 0.009164
16 3 0.010582
16 4 0.011664
16 5 0.012902
16 6 0.014241
16 7 0.015148
16 8 0.016254
16 9 0.017558
16 10 0.018786
16 11 0.020074
16 12 0.020777
16 13 0.022426
16 14 0.023782
16 15 0.023968
16 16 0.023632
17 1 0.007913
17 2 0.009128
17 3 0.010407
17 4 0.011459
17 5 0.012906
17 6 0.014456
17 7 0.015433
17 8 0.016260
17 9 0.017466
17 10 0.018774
17 11 0.019993
17 12 0.021248
17 13 0.022240
17 14 0.023893
17 15 0.025313
17 16 0.027133
17 17 0.025003
18 1 0.009804
18 2 0.009060
18 3 0.010412
18 4 0.011597
18 5 0.012890
18 6 0.014052
18 7 0.015426
18 8 0.017088
18 9 0.017712
18 10 0.018799
18 11 0.020005
18 12 0.021512
18 13 0.022694
18 14 0.023807
18 15 0.025071
18 16 0.026595
18 17 0.026511
18 18 0.026168
19 1 0.010753
19 2 0.009709
19 3 0.010411
19 4 0.011438
19 5 0.012936
19 6 0.014181
19 7 0.015432
19 8 0.016764
19 9 0.018422
19 10 0.019048
19 11 0.019942
19 12 0.021443
19 13 0.022651
19 14 0.023780
19 15 0.024959
19 16 0.026261
19 17 0.028058
19 18 0.028043
19 19 0.027604
20 1 0.010724
20 2 0.010749
20 3 0.011090
20 4 0.011530
20 5 0.012945
20 6 0.014091
20 7 0.015470
20 8 0.016765
20 9 0.018238
20 10 0.019474
20 11 0.020422
20 12 0.024991
20 13 0.022713
20 14 0.023949
20 15 0.025240
20 16 0.026473
20 17 0.027951
20 18 0.029413
20 19 0.029444
20 20 0.029008
21 1 0.010836
21 2 0.010956
21 3 0.012194
21 4 0.012568
21 5 0.013087
21 6 0.014366
21 7 0.015419
21 8 0.016757
21 9 0.018261
21 10 0.019697
21 11 0.021024
21 12 0.021591
21 13 0.022597
21 14 0.023958
21 15 0.025293
21 16 0.026697
21 17 0.027541
21 18 0.029193
21 19 0.030677
21 20 0.030775
21 21 0.030203
22 1 0.010664
22 2 0.011073
22 3 0.012426
22 4 0.013460
22 5 0.013852
22 6 0.014408
22 7 0.015755
22 8 0.017084
22 9 0.018464
22 10 0.019629
22 11 0.020765
22 12 0.022126
22 13 0.022956
22 14 0.023975
22 15 0.025307
22 16 0.026790
22 17 0.028030
22 18 0.029027
22 19 0.030486
22 20 0.031872
22 21 0.032145
22 22 0.031720
23 1 0.010832
23 2 0.010996
23 3 0.012429
23 4 0.013669
23 5 0.014830
23 6 0.015171
23 7 0.015565
23 8 0.016839
23 9 0.018059
23 10 0.019483
23 11 0.020823
23 12 0.022222
23 13 0.023423
23 14 0.024386
23 15 0.025348
23 16 0.026781
23 17 0.028289
23 18 0.029460
23 19 0.030479
23 20 0.031876
23 21 0.033438
23 22 0.033415
23 23 0.032933
24 1 0.010547
24 2 0.010787
24 3 0.012111
24 4 0.013395
24 5 0.014748
24 6 0.016088
24 7 0.016652
24 8 0.016822
24 9 0.018223
24 10 0.019648
24 11 0.020780
24 12 0.022395
24 13 0.023444
24 14 0.024989
24 15 0.025933
24 16 0.026750
24 17 0.028229
24 18 0.029598
24 19 0.030640
24 20 0.031615
24 21 0.033219
24 22 0.034815
24 23 0.034575
24 24 0.034175
25 1 0.010749
25 2 0.010943
25 3 0.012315
25 4 0.013738
25 5 0.015069
25 6 0.016345
25 7 0.017546
25 8 0.017964
25 9 0.018347
25 10 0.019655
25 11 0.020842
25 12 0.022369
25 13 0.023513
25 14 0.024881
25 15 0.026185
25 16 0.026968
25 17 0.027966
25 18 0.029518
25 19 0.030648
25 20 0.032103
25 21 0.033207
25 22 0.034539
25 23 0.036166
25 24 0.036013
25 25 0.035701
26 1 0.011721
26 2 0.012070
26 3 0.013473
26 4 0.014428
26 5 0.015760
26 6 0.017102
26 7 0.018409
26 8 0.019762
26 9 0.019643
26 10 0.019609
26 11 0.021033
26 12 0.022275
26 13 0.023634
26 14 0.024773
26 15 0.026131
26 16 0.027746
26 17 0.028607
26 18 0.029636
26 19 0.030969
26 20 0.032323
26 21 0.033471
26 22 0.034460
26 23 0.035996
26 24 0.037507
26 25 0.037360
26 26 0.037032
27 1 0.011779
27 2 0.012072
27 3 0.013520
27 4 0.014742
27 5 0.015931
27 6 0.017258
27 7 0.018411
27 8 0.019898
27 9 0.020589
27 10 0.020710
27 11 0.020857
27 12 0.022292
27 13 0.023599
27 14 0.024921
27 15 0.026166
27 16 0.027431
27 17 0.028824
27 18 0.029945
27 19 0.030788
27 20 0.032292
27 21 0.033637
27 22 0.034694
27 23 0.035811
27 24 0.037256
27 25 0.038733
27 26 0.038882
27 27 0.038353
28 1 0.011807
28 2 0.012078
28 3 0.013425
28 4 0.014737
28 5 0.015746
28 6 0.017278
28 7 0.018476
28 8 0.019750
28 9 0.020753
28 10 0.021706
28 11 0.021765
28 12 0.022368
28 13 0.023456
28 14 0.024857
28 15 0.026235
28 16 0.027718
28 17 0.028913
28 18 0.030246
28 19 0.031099
28 20 0.032244
28 21 0.033609
28 22 0.034959
28 23 0.036154
28 24 0.037131
28 25 0.038535
28 26 0.039978
28 27 0.040301
28 28 0.039638
29 1 0.011818
29 2 0.012076
29 3 0.013380
29 4 0.014399
29 5 0.015852
29 6 0.017098
29 7 0.018407
29 8 0.019758
29 9 0.020593
29 10 0.021453
29 11 0.022824
29 12 0.026467
29 13 0.023651
29 14 0.024803
29 15 0.026290
29 16 0.027550
29 17 0.029040
29 18 0.030178
29 19 0.031765
29 20 0.032568
29 21 0.033489
29 22 0.034754
29 23 0.036194
29 24 0.037492
29 25 0.038392
29 26 0.039794
29 27 0.041300
29 28 0.041428
29 29 0.040933
30 1 0.011790
30 2 0.012136
30 3 0.013397
30 4 0.014375
30 5 0.015750
30 6 0.017100
30 7 0.018454
30 8 0.019960
30 9 0.020599
30 10 0.021745
30 11 0.022792
30 12 0.027342
30 13 0.024421
30 14 0.024763
30 15 0.026115
30 16 0.027759
30 17 0.029118
30 18 0.030425
30 19 0.031761
30 20 0.033052
30 21 0.033801
30 22 0.034979
30 23 0.036184
30 24 0.037428
30 25 0.038729
30 26 0.039775
30 27 0.041301
30 28 0.042738
30 29 0.042744
30 30 0.042443
31 1 0.011872
31 2 0.012117
31 3 0.013403
31 4 0.014728
31 5 0.016103
31 6 0.017196
31 7 0.018627
31 8 0.019840
31 9 0.020918
31 10 0.021619
31 11 0.023023
31 12 0.027505
31 13 0.025516
31 14 0.025941
31 15 0.026315
31 16 0.027557
31 17 0.029145
31 18 0.030303
31 19 0.031521
31 20 0.033013
31 21 0.034347
31 22 0.035317
31 23 0.036314
31 24 0.037540
31 25 0.038970
31 26 0.040146
31 27 0.041008
31 28 0.042675
31 29 0.044156
31 30 0.044040
31 31 0.043631
32 1 0.011706
32 2 0.012154
32 3 0.013416
32 4 0.014700
32 5 0.015997
32 6 0.017162
32 7 0.018435
32 8 0.019793
32 9 0.020910
32 10 0.021748
32 11 0.023007
32 12 0.024086
32 13 0.025651
32 14 0.026835
32 15 0.027454
32 16 0.027814
32 17 0.029105
32 18 0.030483
32 19 0.031801
32 20 0.033112
32 21 0.034431
32 22 0.035738
32 23 0.036484
32 24 0.037584
32 25 0.038880
32 26 0.040142
32 27 0.041194
32 28 0.042413
32 29 0.043940
32 30 0.045421
32 31 0.045523
32 32 0.044977
33 1 0.011800
33 2 0.012159
33 3 0.013397
33 4 0.014631
33 5 0.016068
33 6 0.017294
33 7 0.018507
33 8 0.020025
33 9 0.020706
33 10 0.021773
33 11 0.023031
33 12 0.027470
33 13 0.025721
33 14 0.026990
33 15 0.028440
33 16 0.028772
33 17 0.029130
33 18 0.030475
33 19 0.031807
33 20 0.033155
33 21 0.034445
33 22 0.035798
33 23 0.037098
33 24 0.037799
33 25 0.038971
33 26 0.040186
33 27 0.041529