note 77087 added to function.md5

From: Date: Tue, 14 Aug 2007 15:48:18 +0000
Subject: note 77087 added to function.md5
Groups: php.notes 
Request: Send a blank email to php-notes+get-129479@lists.php.net to get a copy of this message
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... ---- Server IP: 64.71.164.2 Probable Submitter: 216.194.53.10 ---- Manual Page -- http://www.php.net/manual/en/function.md5.php Edit -- https://master.php.net/note/edit/77087 Del: integrated -- https://master.php.net/note/delete/77087/integrated Del: useless -- https://master.php.net/note/delete/77087/useless Del: bad code -- https://master.php.net/note/delete/77087/bad+code Del: spam -- https://master.php.net/note/delete/77087/spam Del: non-english -- https://master.php.net/note/delete/77087/non-english Del: in docs -- https://master.php.net/note/delete/77087/in+docs Del: other reasons-- https://master.php.net/note/delete/77087 Reject -- https://master.php.net/note/reject/77087 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129479) next »