how to handle very large array?

MoonlightSentinel moonlightsentinel at
Wed Feb 9 18:38:14 UTC 2022

On Wednesday, 9 February 2022 at 10:03:21 UTC, MichaelBi wrote:
> day6 of the advent of code 2021 needs to handle an array of 
> 10^12 length, or even bigger...

As others have mentioned, huge arrays require appropriate memory 
/ the use of memory-mapped files to actually store it. But the 
calculation will take a *long* time even if your program could 
allocate an array of that size.

There's a way to use a much smaller array to manage the 
lanternfish population...

More information about the Digitalmars-d-learn mailing list