-
Notifications
You must be signed in to change notification settings - Fork 0
/
eul14 benchmarks.txt
97 lines (82 loc) · 2.86 KB
/
eul14 benchmarks.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
largest number seen / log base 2
5 1570824736 31
6 56991483520 36
7 60342610919632 46
8 2185143829170100 51
9 1414236446719942480 61
10 7168235036980384402 63
C# odd only from limit/2 to limit skip n%3 == 2, only check n%32 == [1,7,9,11,15,25,27,31]
7 8400511 686 2.866
with optimize
7 8400511 686 0.718
g++ odd only from limit/2 to limit only check n%96 == [1, 7, 9, 15, 25, 27, 31, 33, 39, 43, 57, 63, 73, 75, 79, 91]
7 8400511 686 2.096
with optimize and ctz
6 837799 525 0.041015
7 8400511 686 0.456015
8 63728127 950 5.189506
msvc++ optimized with bsf odd only from limit/2 to limit only check n%96 == [1, 7, 9, 15, 25, 27, 31, 33, 39, 43, 57, 63, 73, 75, 79, 91]
6 837799 525 0.010780
7 8400511 686 0.117788
8 63728127 950 1.324537
9 670617279 987 14.768860
10 9780657631 1133 161.957299
msvcc++ bitpacked wheel with bsf
6 837799 525 0.010363
7 8400511 686 0.117629
8 63728127 950 1.317339
9 670617279 987 14.610790
asm odd only from limit/2 to limit
6 837799 0.101411
7 8400511 1.139076
8 63728127 13.391846
asm bitpacked wheel
6 837799 0.038918
7 8400511 0.425277
8 63728127 4.918434
asm bitpacked wheel optimized with bsf
6 837799 0.010493
7 8400511 0.119489
8 63728127 1.325586
9 670617279 14.832977p
numba multithreaded brute force odd only from limit/2 to limit skip n%3 == 2, only check n%32 == [1,7,9,11,15,25,27,31]
6 837799 525 83340 0.20218968391418457
7 8400511 686 833340 0.20702695846557617
8 63728127 950 8333340 0.5966775417327881
9 670617279 987 83333340 5.344711542129517
10 9780657631 1133 833333340 58.80452919006348
numba multithreaded by chunks
6 837799 525 83352 0.2050166130065918
7 8400511 686 833371 0.20601606369018555
8 63728127 950 8333365 0.6345186233520508
9 670617279 987 83333333 5.5035810470581055
10 9780657631 1133 833333333 58.6306529045105
numba brute force odd only from limit/2 to limit skip n % 3 == 2 and n % 32 == 3,5,13,17,19,21,23,29
5 77031 351 8348 0.12990188598632812
6 837799 525 83340 0.14742636680603027
7 8400511 686 833340 0.38472700119018555
8 63728127 950 8333340 3.014409303665161
9 670617279 987 83333340 32.49353575706482
10 9780657631 1133 833333340 357.4056453704834
numba with cache from limit to limit/2 odd only and skip n % 3 == 2 and n % 32 == 3,5,13,17,19,21,23,29
5 77031 351 6291 0.2717568874359131
6 837799 525 62817 0.33469533920288086
7 8400511 686 628637 1.0866217613220215
8 63728127 950 6286531 8.594017744064331
9 670617279 987 62864547 82.52797341346741
numba brute force no cache
7 8400511 686 6.057659387588501
8 63728127 950 67.63685345649719
with backcaching
5 77031 351 0.32917165756225586
6 837799 525 3.1809074
e878692627
7 8400511 686 33.488149642944336
with forward caching
5 77031 351 0.31957435607910156
6 837799 525 3.1335771083831787
7 8400511 686 31.318748950958252
with caching going backwards from limit to limit*3/4
5 77031 351 0.19529318809509277
6 837799 525 1.8898849487304688
7 8400511 686 17.818103075027466