Cool VL Viewer forum http://sldev.free.fr/forum/ |
|
Why use MD5 when SHA256 is at least twice as fast? http://sldev.free.fr/forum/viewtopic.php?f=10&t=2261 |
Page 1 of 1 |
Author: | kathrine [ 2022-04-06 00:00:37 ] | |||||||||
Post subject: | Why use MD5 when SHA256 is at least twice as fast? | |||||||||
I noticed this new snippet in the 1.29.0 patches:
If this is performance critical, i would suggest to kick out MD5 and use one of the hardware accelerated hashes in openssl (or a non cryptographic hash thats even faster). e.g. SHA256 tends to be at least twice as fast on modern hardware supporting SHA-NI instructions (see https://stackoverflow.com/questions/206 ... 2-encoding ) Try: openssl speed -evp md5 vs. openssl speed -evp sha256 |
Author: | Henri Beauchamp [ 2022-04-06 00:13:39 ] |
Post subject: | Re: Why use MD5 when SHA256 is at least twice as fast? |
LL's code is indeed super-slow, but it is almost never executed because I added the mesh skin UUID digest (XORing of the two 64 bits long words making up an UUID): all the meshes downloaded via the mesh repository (i.e. from the grid) do have an UUID, and so only my super-fast "mHash = mMeshID.getDigest64();" line is ever executed. The only exception would be for the mesh upload floater (i.e. meshes you load from a local file and that do not have an UUID), which is not time critical at all. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |