[Gambas-user] Checksum for array and collection

Martín mbelmonte at belmotek.net
Thu Mar 16 15:29:57 CET 2023


El 16/3/23 a las 12:35, Benoit Minisini escribió:
> Le 16/03/2023 à 11:42, Martín a écrit :
>> El 16/3/23 a las 10:55, Benoit Minisini escribió:
>>> You can serialize your data in a string
>>
>> if serialize don't use a charter for separate each item there are the 
>> possibility of error.
>
> Serialized data is not a string, it's a binary format stored in a 
> string. Look at the documentation of the READ and WRITE functions.
>
> Regards,
>
I has made the check, serialized method is faster that check recursively 
the content of the Collection but only in the case that the collection 
has not changed the number of items, in that case it is faster the other 
method that takes into account if .Count is different from the initial 
state, if so it does not make sense to make more checks that involve 
computation, because the collection is already different from the 
initial state.
So the conclusion is that the most efficient is to use serialisation but 
only if the collection does not change the number of items.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample-collection-compare-0.0.2.tar.gz
Type: application/gzip
Size: 13452 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230316/44bb052e/attachment-0001.gz>


More information about the User mailing list