[PHP-DEV] Hashtable collision resolution in PHP 7

2017-05-16 Thread 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

Re: [PHP-DEV] Hashtable collision resolution in PHP 7

2017-05-16 Thread 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

Re: [PHP-DEV] Hashtable collision resolution in PHP 7

2017-05-16 Thread Dmitry Stogov
PHP 7 still uses a kind of linked list for collision resolution (trough zval.u2.next) and this is still an expensive operation. From: Pawel Por Sent: Tuesday, May 16, 2017 12:28:36 PM To: internals@lists.php.net Subject: [PHP-DEV] Hashtable collision resolution

Re: [PHP-DEV] Hashtable collision resolution in PHP 7

2017-05-16 Thread Julien Pauli
On Tue, May 16, 2017 at 12:00 PM, Sara Golemon wrote: > 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