Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24412 invoked by uid 1010); 18 Jul 2007 18:23:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24395 invoked from network); 18 Jul 2007 18:23:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2007 18:23:57 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 64.233.166.182 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 64.233.166.182 py-out-1112.google.com Received: from [64.233.166.182] ([64.233.166.182:50889] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/17-01090-CBA5E964 for ; Wed, 18 Jul 2007 14:23:56 -0400 Received: by py-out-1112.google.com with SMTP id f31so899088pyh for ; Wed, 18 Jul 2007 11:23:53 -0700 (PDT) Received: by 10.35.36.13 with SMTP id o13mr3029701pyj.1184783033659; Wed, 18 Jul 2007 11:23:53 -0700 (PDT) Received: from ?192.168.0.149? ( [204.101.63.110]) by mx.google.com with ESMTPS id x48sm1186931pyg.2007.07.18.11.23.52 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jul 2007 11:23:52 -0700 (PDT) In-Reply-To: <469E59FA.6060104@keryx.se> References: <469E59FA.6060104@keryx.se> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <0E62C134-68DF-4240-81BB-3A3EEA0E293D@prohost.org> Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Wed, 18 Jul 2007 14:23:38 -0400 To: Keryx Web X-Mailer: Apple Mail (2.752.3) Subject: Re: [PHP-DEV] libc and random functions From: ilia@prohost.org (Ilia Alshanetsky) Do you have a patch? On 18-Jul-07, at 2:20 PM, Keryx Web wrote: > I do not know if this post made it to the list a while ago. No one > answered and i see I used the wrong account to send it. Please > forgive me if this is a redundant re-post. > > > This is a suggestion I think would not be too hard to implement: > > Skip libc for all random functions. As I see it there is no reason > to keep it. I can't think of any application that would break if > rand() would produce better random results at a higher speed. > > So basically what I am saying is this: Implement the mersenne > twister in the back of all random functions. > > 1. Make rand() an alias to mt_rand() > 2. Make srand() an alias to mt_srand() (And since they are > redundant give an E_STRICT?) > 3. Make getrandmax() an alias to mt_getrandmax() > 4. Have array_rand() implement MT in the back (if it is not doing > so already) > > > > Lars Gunther > > P.S. For an introduction to who I am one might read: > http://www.webstandards.org/action/edutf/interviews/gunther-en/ > and look at > http://www.flickr.com/photos/keryxgunther/143376264/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Ilia Alshanetsky