Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99057 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37829 invoked from network); 16 May 2017 10:00:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2017 10:00:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 74.125.82.43 mail-wm0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:38740] helo=mail-wm0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/E1-15531-AADCA195 for ; Tue, 16 May 2017 06:00:10 -0400 Received: by mail-wm0-f43.google.com with SMTP id v15so85407863wmv.1 for ; Tue, 16 May 2017 03:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=nmv10YP7F1CID3Ev41F5FeakNkLvGKogt5eUHyLIaGc=; b=GLhBiF0eWoasq432tE58ojhGVxUaX0x69znsWHzhJZ0p/+kuH3MwBFL/a9rhlxw6UH 27I/IOa6H6qyaA9rb5z3S6EBfjIvPwu1gez7rBQvtUfajUttXSfac2Bjt8gH8rBkhTv/ sJG3u8esrk8nPf8yKNNiuDZV9Jqkd79s+D2Nb8eAsmPNKWi48fxBjIOARRWX28qe4BUu sqNK7vZogSOHv9sGbspFC1MeIvuk4wYformbmaRqUrMwgLiGXqqdngGHDloXZ2xLKhSe Mo2HH+HS4qZ7NoNEDl4sIv15qsrXugsFyi26HCDt6GxfLpNqVoXCTJS1SUsAssnZvw2y v9sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=nmv10YP7F1CID3Ev41F5FeakNkLvGKogt5eUHyLIaGc=; b=t0uEEYK8Nk1qEXkitb2FduGyeeEQ9rKA5PnTj3y16YjFluYKrp7UzE8Bv2+Bh6zOdA svs5wF18o813nAerDHvw0xVgXmIrjz74wAsOFK4djk48aeG4BHDu/II9Y6AU6PbdirIa 5OaK4GU+Lpyd/D+42zePhHgnYG0GJCotdFp1SamofTjIBcNL8l3UApRGbn8Z+6v0DiTM 1vizvUrPpxmr9kyj+rIzr4F5ycPFyjG9rzrR7Zu9ygvAsC1KAOsd1KCUhgdNoLeNIFNA GPHTbsiOF5hYfNpx+pGg1huXzxHUvFFQuUwRbkw+/lDpAD8V4351RqDAuc8ujjYXtHI9 zyhw== X-Gm-Message-State: AODbwcCywKKB/1LS8YVydeZNKUVYkKzTeOhVkBIvzKcsL2aHjPxi4PBl c2wluUA2/ky54K1b4fV9GKWBcuyUXA== X-Received: by 10.223.173.74 with SMTP id p68mr6792291wrc.163.1494928807197; Tue, 16 May 2017 03:00:07 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.157.38 with HTTP; Tue, 16 May 2017 03:00:06 -0700 (PDT) X-Originating-IP: [73.9.224.155] In-Reply-To: References: Date: Tue, 16 May 2017 05:00:06 -0500 X-Google-Sender-Auth: cyYNrbES0LWxs6HAhqXBjAROe-k Message-ID: To: Pawel Por Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Hashtable collision resolution in PHP 7 From: pollita@php.net (Sara Golemon) https://nikic.github.io/2014/12/22/PHPs-new-hashtable-implementation.html On Tue, May 16, 2017 at 4:28 AM, Pawel Por wrote: > Hi > > I'm trying to understand why PHP 7 hashtables are more efficient than > PHP 5 hashtables. > I'm confused about hashes that are in collision. > In PHP 5 there were a linked lists to resolve collisions. > What about PHP 7 ? Are there still linked lists ? > I read somewhere that the solution taken in PHP 7 is L1 cache friendly > so I conclude PHP 7 cannot resolve collisions using linked lists but > rather arrays. > If so please write me where the buckets that are in collision are > stored in memory I mean by what field the array is pointed to by (e.g. > zval.u2.next) and a few words of high level design of how it is > implemented. > > thanks for help > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >