note 77087 deleted from function.md5 by danbrown
| From: | danbrown@php.net | Date: | Mon, 20 Jun 2011 15:21:19 +0000 |
| Subject: | note 77087 deleted from function.md5 by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180745@lists.php.net to get a copy of this message | ||
Note Submitter: ircmaxell at gmail dot com
----
In Response To AzuMao
I did some speed tests (1000 repetitions), and my results are slightly different (php 5.2.2).
Here's what I got for string 'string' (6 characters):
0.0065789222717285- MD5
0.0078611373901367- SHA1
0.00068497657775879- CRC32
0.0021169185638428- HASH(md5)
0.0026431083679199- HASH(sha1)
0.0014209747314453- HASH(CRC32)
for a 14000 character string however (a standard HTML page), here's the results
0.08871603012085- MD5
0.21350693702698- SHA1
0.062330007553101- CRC32
0.083562850952148- HASH(md5)
0.2072479724884- HASH(sha1)
0.060271978378296- HASH(CRC32)
So actually So actually, MD5 is significantly more efficient than SHA1. Not to mention, that
hash(func) seems to be faster than func...