Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39129 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46739 invoked from network); 21 Jul 2008 15:29:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2008 15:29:59 -0000 Authentication-Results: pb1.pair.com header.from=michal.dziemianko@gmail.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=michal.dziemianko@gmail.com; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain gmail.com does not designate 82.132.130.152 as permitted sender) X-PHP-List-Original-Sender: michal.dziemianko@gmail.com X-Host-Fingerprint: 82.132.130.152 sidious.london.02.net Linux 2.6 Received: from [82.132.130.152] ([82.132.130.152:58872] helo=mail.o2.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 71/B2-33452-57BA4884 for ; Mon, 21 Jul 2008 11:29:58 -0400 Received: from [192.168.1.64] (78.86.103.249) by mail.o2.co.uk (8.0.013.3) (authenticated as michal_dziemianko@o2.co.uk) id 4863729D04BF62AA for internals@lists.php.net; Mon, 21 Jul 2008 16:29:55 +0100 Mime-Version: 1.0 (Apple Message framework v753.1) To: internals@lists.php.net Message-ID: Content-Type: multipart/mixed; boundary=Apple-Mail-3--23717929 Date: Mon, 21 Jul 2008 16:29:26 +0100 X-Mailer: Apple Mail (2.753.1) Subject: zend_inline_hash_function reimplementation From: michal.dziemianko@gmail.com (Michal Dziemianko) --Apple-Mail-3--23717929 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hello, I have looked into Zend/zend_hash.h and I guess it might be sped up a little. So far it uses D. Bernstein's hash which is quite fast, but I think it might be worth replacing it with MurmurHash. I have tried comparison of speed for them (both as separate C programs, and compiled into PHP 5_3). Results for REAL keys (collected on running web server) are at the bottom of this page: http://212.85.117.53/gsoc/ index.php?option=com_content&view=article&id=65:hash-functions-for- hash-tables&catid=34:profiling&Itemid=54 Murmur is Public Domain, and its author is maintaining it all the time so I guess it will be faster and better. There is comparison of distribution at both the page I gave and here: http:// murmurhash.googlepages.com/ The patch for 5_3 (applicable to HEAD) as attachment --Apple-Mail-3--23717929 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Cheers, Michal --Apple-Mail-3--23717929--