php-developer-list | 2002112
Date: 11/30/02
- Next message: Sascha Schumann: "Re: [PHP-DEV] Zend fast cache"
- Previous message: George Schlossnagle: "Re: [PHP-DEV] Zend fast cache"
- In reply to: Daniel Cowgill: "Re: [PHP-DEV] Zend fast cache"
- Next in thread: Sascha Schumann: "Re: [PHP-DEV] Zend fast cache"
- Reply: Sascha Schumann: "Re: [PHP-DEV] Zend fast cache"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
A little off-list discussion has sold me on the linked list
implementation. Seems very fast and very simple.
George
On Saturday, November 30, 2002, at 07:53 PM, Daniel Cowgill wrote:
>
> On Saturday, November 30, 2002, at 07:17 PM, Sterling Hughes wrote:
>
>> The problem I see with an array approach from an api perspective is
>> simply when a bucket
>> is free'd, in order to have efficient memory usage, we'd need a
>> second level array scan
>> for every ALLOC_ZVAL().
>>
>> Perhaps a linked list would be a better choice for this, as we can
>> just be smart about bucket
>> access, and eliminate the need for a scan (could be possible I'm
>> missing something?)
>
> I agree, a singly linked list seems like a no-brainer; it's an ideal
> memory-pool data structure because inserts and deletes occur only at
> the front of the list (so they're constant-time), the links are free,
> and the implementation is straightforward.
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Sascha Schumann: "Re: [PHP-DEV] Zend fast cache"
- Previous message: George Schlossnagle: "Re: [PHP-DEV] Zend fast cache"
- In reply to: Daniel Cowgill: "Re: [PHP-DEV] Zend fast cache"
- Next in thread: Sascha Schumann: "Re: [PHP-DEV] Zend fast cache"
- Reply: Sascha Schumann: "Re: [PHP-DEV] Zend fast cache"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

