Saving and loading large data sets easily and efficiently

Brett Brett at gmail.com
Thu Oct 3 23:48:20 UTC 2019


On Thursday, 3 October 2019 at 14:38:35 UTC, Bastiaan Veelo wrote:
> On Monday, 30 September 2019 at 20:10:21 UTC, Brett wrote:
> [...]
>> The way the data is structured is that I have a master array 
>> of non-ptr structs.
>>
>> E.g.,
>>
>> S[] Data;
>> S*[] OtherStuff;
>>
>> then every pointer points to an element in to Data. I did not 
>> use int's as "pointers" for a specific non-relevant reason 
>> [...]
>
> I would seriously consider turning that around and work with 
> indices primarily, then take the address of an indexed element 
> whenever you do need a pointer for that specific non-relevant 
> reason. It makes I/O trivial, and it is safer too.
>
> size_t[] OtherStuff;
> size_t[int] MoreStuff;
>
> Bastiaan.

No it doesn't.


More information about the Digitalmars-d-learn mailing list