User talk:Petelomax: Difference between revisions
Content added Content deleted
(→Smallest power of 6 whose decimal expansion contains n: new section) |
|||
Line 179: | Line 179: | ||
: Good catch, page + talk updated. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 16:56, 9 March 2021 (UTC) |
: Good catch, page + talk updated. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 16:56, 9 March 2021 (UTC) |
||
== Smallest power of 6 whose decimal expansion contains n == |
|||
Hello Pete,<BR>I'm investigating the runtime problem.Runnig on TIO.RUN the same increase of a factor of ~10x after 100000<BR>I'm checking the mean power, when the string was found, and the mean power for the last 1024 checks.<BR> |
|||
One digit more > 3x power ( aka lenght of search string. runtime about 3x lenght * 3x count ~> 10x ) to find the search string.<BR>I've got no idea, how to speed up. [[User:Horsth|Horsth]] 11:21, 9 April 2021 (UTC) |
|||
<pre> |
|||
//power_Limit= 25000 -> used by strings 243,194,474. Generating time to power limit 0.859s |
|||
checking every 1024: |
|||
Generating all numerical strings up to power limit 6260 takes 0.056s |
|||
used by strings 15,252,500 ~ 16Mb |
|||
Search mean last |
|||
string power mean Delta time |
|||
power |
|||
0 9.00 0.01 0.000 |
|||
1024 46.62 46.65 0.002 |
|||
2048 94.98 143.40 0.018 |
|||
3072 111.74 145.27 0.017 |
|||
4096 120.09 145.16 0.017 |
|||
5120 125.31 146.17 0.017 |
|||
6144 129.45 150.19 0.018 |
|||
7168 131.38 142.94 0.017 |
|||
8192 133.10 145.11 0.017 |
|||
9216 134.22 143.21 0.016 |
|||
10240 142.94 221.43 0.052 |
|||
11264 170.38 444.83 0.156 |
|||
12288 193.64 449.45 0.159 |
|||
13312 213.66 453.99 0.164 |
|||
14336 230.34 447.23 0.161 |
|||
15360 245.28 454.43 0.169 |
|||
..... |
|||
98304 421.65 466.58 0.170 |
|||
99328 422.18 473.67 0.172 |
|||
100352 426.05 801.41 0.656 |
|||
101376 436.00 1410.97 1.561 |
|||
102400 446.06 1441.35 1.671 |
|||
103424 455.71 1421.37 1.607 |
|||
104448 465.18 1421.69 1.600 |
|||
... |
|||
117760 573.58 1397.76 1.458 |
|||
118784 580.85 1416.78 1.511 |
|||
119808 588.16 1436.94 1.566 |
|||
mean power 589.35 |
|||
real 0m44,996s |
|||
</pre> |