note 76881 added to function.hash

From: Date: Fri, 03 Aug 2007 16:46:44 +0000
Subject: note 76881 added to function.hash
Groups: php.notes 
Request: Send a blank email to php-notes+get-129152@lists.php.net to get a copy of this message
<?php /*PHP Version 5.2.3*/ echo 'hash<br />'; $time=microtime(1); for ($i=0;$i<500000;$i++) hash('md4', 'string'); echo microtime(1)-$time,': md4<br / >'; $time=microtime(1); for ($i=0;$i<500000;$i++) hash('md5', 'string'); echo microtime(1)-$time,': md5<br / >'; $time=microtime(1); for ($i=0;$i<500000;$i++) hash('adler32', 'string'); echo microtime(1)-$time,': adler32<br / >'; $time=microtime(1); for ($i=0;$i<500000;$i++) hash('crc32', 'string'); echo microtime(1)-$time,': crc32<br / >'; $time=microtime(1); for ($i=0;$i<500000;$i++) hash('crc32b', 'string'); echo microtime(1)-$time,': crc32b<br / >'; $time=microtime(1); for ($i=0;$i<500000;$i++) hash('sha1', 'string'); echo microtime(1)-$time,': sha1<br / >'; echo 'md5(),sha1()><br />'; $time=microtime(1); for ($i=0;$i<500000;$i++) md5('string'); echo microtime(1)-$time,': md5<br>'; $time=microtime(1); for ($i=0;$i<500000;$i++) sha1('string'); echo microtime(1)-$time,': sha1<br>'; ?> hash 1.1421868801117: md4 1.2192211151123: md5 1.0528500080109: adler32 0.89074683189392: crc32 0.92654180526733: crc32b 1.3730161190033: sha1 =========>> 0.83056497573853: md5 1.0000810623169: sha1 ---- Server IP: 69.147.83.197 Probable Submitter: 125.36.151.226 ---- Manual Page -- http://www.php.net/manual/en/function.hash.php Edit -- https://master.php.net/note/edit/76881 Del: integrated -- https://master.php.net/note/delete/76881/integrated Del: useless -- https://master.php.net/note/delete/76881/useless Del: bad code -- https://master.php.net/note/delete/76881/bad+code Del: spam -- https://master.php.net/note/delete/76881/spam Del: non-english -- https://master.php.net/note/delete/76881/non-english Del: in docs -- https://master.php.net/note/delete/76881/in+docs Del: other reasons-- https://master.php.net/note/delete/76881 Reject -- https://master.php.net/note/reject/76881 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129152) next »