Talk:Rare numbers: Difference between revisions

→‎21+ digit rare numbers: Added some further comments.
(→‎21+ digit rare numbers: Responded to Nigel)
(→‎21+ digit rare numbers: Added some further comments.)
Line 618:
 
:::::::We've certainly had a wide variation in the timings for this task and it appears now that g++ is much slower than both clang and mingw for some reason. The C# time for 17 numbers looks right to me as my Go translation was only a second or two behind, again using Core I7. I'm surprised how much quicker C++ is than C#, its stable-mate VB.NET and Go for this task. Although Enter your Username has clearly tried hard to minimize the effect of GC by declaring huge swathes of variables 'static', the performance gap is still huge. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 11:35, 14 March 2020 (UTC)
 
::::::::I thought for good measure I'd add a Go translation of your C++ program (10 to 19 digits version) and this has cut the execution time from 54 to 21 minutes in round figures which seems more in line with expectations. For comparison, I compiled the C++ program again (using g++ 7.5.0 this time) and ran it on the same machine but the total execution time was almost identical at around 30 minutes so it's difficult to know what to make of it. Perhaps g++ is not yet quite up to speed with C++ 17 features? --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 17:07, 16 March 2020 (UTC)
 
::::: I find it hard to believe that clang++ could be 3 times faster than g++ (though you can get some strange results with these CPU-intensive tasks) and, although I no longer have an up to date Windows machine, on past form I'd be surprised if Visual C++ were any faster than g++ itself. Enter your username may be able to confirm the position there. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 20:53, 20 December 2019 (UTC)
9,485

edits