[Cdash] ITK appears in GDCM cdash
eric.noulard at gmail.com
Thu Sep 3 12:25:47 UTC 2009
2009/9/3 Julien Jomier <julien.jomier at kitware.com>:
> Amitha Perera wrote:
>> Do you need a small integer? You should really use a well known
>> hashing algorithm, like SHA. I think even the 160-bit SHA-1 should be
>> good enough for CDash.
> The main issue is speed. For every test submitted we check if the computed
> crc32 is already in the database, if not we insert the new test. Comparing
> string is usually very slow for SQL queries, that's why crc32 was a good
> fit. Can SHA-1 (or other algorithms) return an integer?
In fact they always do, but command line tools usually display
those binaries "number" as hexadecimal string.
Message digest algorithm produce a binary value of various length
(see the SHA family) http://en.wikipedia.org/wiki/SHA)
As already told SHA-1 is 160 bits long but you have SHA-256 (256 bits)
or SHA-512 (512 bits), MD5 is 128bits long etc...
Thus you may store the result of the hash called
the Message Digest in an integer of the appropriate size.
For MD5 (128bits) you may store the result in four SQL "INT"
which are 4 bytes (=32bits) long or two MySQL "BIGINT" which are 8 bytes long.
Then instead of doing a single INT comparison you need to
do as many INT comparison as you have to considering the length
or the "Message Digest".
Membre de l'April - « promouvoir et défendre le logiciel libre » -
More information about the CDash