Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99056 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35437 invoked from network); 16 May 2017 09:45:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2017 09:45:04 -0000 Received: from [127.0.0.1] ([127.0.0.1:16773]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id A1/81-15531-F1ACA195 for ; Tue, 16 May 2017 05:45:03 -0400 Authentication-Results: pb1.pair.com smtp.mail=porparek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=porparek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: porparek@gmail.com X-Host-Fingerprint: 209.85.223.180 mail-io0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:34971] helo=mail-io0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/71-15531-646CA195 for ; Tue, 16 May 2017 05:28:39 -0400 Received: by mail-io0-f180.google.com with SMTP id f102so89480802ioi.2 for ; Tue, 16 May 2017 02:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=zNgevX2J6DXvfvC/kjSuQTEC2w8sEve/vtP7PaixOJc=; b=MMdh39/xNnmb1xiXXvJeuqAJvJwpQilzUYpShHaHHDhJJxPybtW9z1NQr8G8k2gqkO 6FiRp1PIt7qbWuZFQPkZ1jIUDQHWhtETu86Y7kjyefMvt/a9ROhRU1/x4brnr0Vl3Z+i s1CwX/PHTPr3Jm0AxC7DQEux0ax/qgQHS2MkM4sxn/J4e9BViSEH2Ey0TWho4Y8A06ry 01ShXE9cJ+g9GK72ySaVZ8V5jyTTmTFNKDynAqgtuG/z1jsMz2gASYBis1bnJ49pjJQQ RTMOLuVoVHqMPIam5xORBwb8nHOy8Al5FpsSHcXmJSQEdy5T2EhbMwHiK+p3zvIVYQkL VIrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zNgevX2J6DXvfvC/kjSuQTEC2w8sEve/vtP7PaixOJc=; b=UFemQO8tN9QLRLAHOEh1qolpZXq0Sbw313VUOlcRT1a66FQDAzR7qQAzYDsisZ77Yi o1Bd1T/exsgbdIgvO7jg8roIhi4hnlDppdpDsgokUPaTyGTbVamdwmiKx0PxBWLh397W tXXYwiNLC+TBCIzuX4EtyPF8STgHcaiQs3Gjdrk8MWcPD/m1XF9BUTaDM6BUvAu5DZ/G 1NtCpPSNn0u7RLRKa0pP3f9/MxDNDPZovM7zvJmCBz339hcjbcITi+b2mmI+7/5d4eSg wkYW3rNDQ8a7lyhLRvckGg/zFSpqokkRSnJTRV1X/HG342AKCxMhyCq3TIhkrJUKJrfp kGJw== X-Gm-Message-State: AODbwcC18SwvcEd8hHqmK3VljO40dJ37pcxjCP4hUh0SoOBz79ds0f3o xvGL33cnppDpvvBUCKIXEj5MuZ5M+x5L X-Received: by 10.107.173.16 with SMTP id w16mr9444450ioe.81.1494926916461; Tue, 16 May 2017 02:28:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.26.133 with HTTP; Tue, 16 May 2017 02:28:36 -0700 (PDT) Date: Tue, 16 May 2017 11:28:36 +0200 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Hashtable collision resolution in PHP 7 From: porparek@gmail.com (Pawel Por) 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