[Gambas-user] Checksum for array and collection

Christof Thalhofer chrisml at deganius.de
Thu Mar 16 17:30:29 CET 2023


Am 16.03.23 um 15:29 schrieb Martín:

> 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.

Checksum must work with the data being checked alone.

Comparing the output of '.Count' would assume that it has previously 
stored the counted number. This would be another beast.

Thanks everybody and thank you for the test!

Thank you Benoît for this nice and fast algorithm.

:-)

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230316/6d6d9bcc/attachment.sig>


More information about the User mailing list