Modern C++ Lamentations
Steven Schveighoffer
schveiguy at gmail.com
Fri Jan 4 16:21:40 UTC 2019
On 1/4/19 9:00 AM, Dukc wrote:
> On Monday, 31 December 2018 at 13:20:35 UTC, Atila Neves wrote:
>> Blog:
>>
>> https://atilanevesoncode.wordpress.com/2018/12/31/comparing-pythagorean-triples-in-c-d-and-rust/
>>
>
> Isn't the main problem with performance of the Timon's range loop that
> it uses arbitrary-sized integers (BigInts)?
Atila's version of that code doesn't use bigints:
https://github.com/atilaneves/pythagoras/blob/master/range.d#L24
The major problem with the D range implementation is that the compiler
isn't able to find the optimization of hoisting the multiplication of
the outer indexes out of the inner loop.
See my responses to Atila in this thread.
-Steve
More information about the Digitalmars-d
mailing list