Rare numbers: Difference between revisions
m
→{{header|C#}}: updated output to 19 digits, edited performance remarks
m (promoted draft task to a (full) task.) |
m (→{{header|C#}}: updated output to 19 digits, edited performance remarks) |
||
Line 125:
}</lang>
{{out}}
Results from a core i7-7700 @ 3.6Ghz. This C# version isn't as fast as the Go version using the same hardware. C# computes up to 17, 18 and 19 digits in under 9 minutes,
<pre style="height:64ex;overflow:scroll"> digs elapsed(ms) R/N Unordered Rare Numbers▼
The '''''long'''-to-'''ulong''''' conversion isn't causing the reduced performance, C# has more overhead as compared to Go. This C# version can easily be converted to use BigIntegers to go beyond 19 digits, but becomes around eight times slower. (ugh!)
28 1 (65)▼
2 29▼
4 29
5 29
6
7 30
8 34
9 36
61 5 (2,042,832,002)
10
11
935 8 (868,591,084,757)
12 1,
1,
13 2,
6,
6,
8,
21,
21,
14 23,
24,
27,
29,
29,
29,
35,
35,
15 38,
92,
127,
16
17
576,058 44 (284,684,666,566,486,482)
707,530 45 (225,342,456,863,243,522)
756,188 46 (225,342,458,663,243,522)
856,346 47 (225,342,478,643,243,522)
928,546 48 (284,684,868,364,486,482)
1,311,170 49 (871,975,098,681,469,178)
2,031,664 50 (865,721,270,017,296,468)
2,048,209 51 (297,128,548,234,950,692)
2,057,281 52 (297,128,722,852,950,692)
2,164,878 53 (811,865,096,390,477,018)
2,217,508 54 (297,148,324,656,930,692)
2,242,999 55 (297,148,546,434,930,692)
2,576,805 56 (898,907,259,301,737,498)
3,169,675 57 (631,688,638,047,992,345)
3,200,223 58 (619,431,353,040,136,925)
3,482,517 59 (619,631,153,042,134,925)
3,550,566 60 (633,288,858,025,996,145)
3,623,653 61 (633,488,632,647,994,145)
4,605,503 62 (653,488,856,225,994,125)
5,198,241 63 (497,168,548,234,910,690)
18 6,028,721
6,130,826 64 (2,551,755,006,254,571,552)
6,152,283 65 (2,702,373,360,882,732,072)
6,424,945 66 (2,825,378,427,312,735,282)
6,447,566 67 (8,066,308,349,502,036,608)
6,677,925 68 (2,042,401,829,204,402,402)
6,725,119 69 (2,420,424,089,100,600,242)
6,843,016 70 (8,320,411,466,598,809,138)
7,161,527 71 (8,197,906,905,009,010,818)
7,198,112 72 (2,060,303,819,041,450,202)
7,450,028 73 (8,200,756,128,308,135,597)
7,881,502 74 (6,531,727,101,458,000,045)
9,234,318 75 (6,988,066,446,726,832,640)
19 9,394,513
The
1: 65
2: 621,770
Line 230 ⟶ 266:
41: 22,542,040,692,914,522
42: 67,725,910,561,765,640
43: 86,965,750,494,756,968
44: 225,342,456,863,243,522
45: 225,342,458,663,243,522
46: 225,342,478,643,243,522
47: 284,684,666,566,486,482
48: 284,684,868,364,486,482
49: 297,128,548,234,950,692
50: 297,128,722,852,950,692
51: 297,148,324,656,930,692
52: 297,148,546,434,930,692
53: 497,168,548,234,910,690
54: 619,431,353,040,136,925
55: 619,631,153,042,134,925
56: 631,688,638,047,992,345
57: 633,288,858,025,996,145
58: 633,488,632,647,994,145
59: 653,488,856,225,994,125
60: 811,865,096,390,477,018
61: 865,721,270,017,296,468
62: 871,975,098,681,469,178
63: 898,907,259,301,737,498
64: 2,042,401,829,204,402,402
65: 2,060,303,819,041,450,202
66: 2,420,424,089,100,600,242
67: 2,551,755,006,254,571,552
68: 2,702,373,360,882,732,072
69: 2,825,378,427,312,735,282
70: 6,531,727,101,458,000,045
71: 6,988,066,446,726,832,640
72: 8,066,308,349,502,036,608
73: 8,197,906,905,009,010,818
74: 8,200,756,128,308,135,597
75: 8,320,411,466,598,809,138</pre>
=={{header|F_Sharp|F#}}==
|