OK I misunderstood then. I thought your proposal means that
zend_hash_key == HashKey.
How would they be different, or is there some info which one would
have and the other not?
Andi
At 11:01 AM 3/16/2006, Marcus Boerger wrote:
Hello Andrei,
we need it right now becuase of the current layou
compiler doesn't automatically align the data the next block is
unaligned. Also if not forcing to use any byte you get back the 4 bytes
i added in the above in case of interger indices.
best regards
marcus
>> -Original Message-
>> From: Marcus Boerger [mailto:[EMAIL PROTE
Hello Andrei,
we need it right now becuase of the current layout. And imo that's a
design flaw which is why i brought it up here with an option on how to
change it after discussing it. Having two different layouts allows us
to not need to a pointer to the key string plus eventually allocate
memo
On Mar 11, 2006, at 4:22 AM, Marcus Boerger wrote:
[snip]
So now HashKey matches zend_hash_key just by pure reordering.
Why do we need both HashKey and zend_hash_key?
-Andrei
--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ot a real problem. Buckets are always aligned by C compilers
or (e)malloc().
Thanks. Dmitry.
> -Original Message-
> From: Marcus Boerger [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 13, 2006 12:02 PM
> To: Dmitry Stogov
> Cc: php-i18n@lists.php.net
> Subject: Re:
i added in the above in case of interger indices.
best regards
marcus
>> -Original Message-
>> From: Marcus Boerger [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, March 12, 2006 1:59 PM
>> To: Dmitry Stogov
>> Cc: php-i18n@lists.php.net
>> Subject: Re: [PHP-I1
nteger index case".
Thanks. Dmitry.
> -Original Message-
> From: Marcus Boerger [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 12, 2006 1:59 PM
> To: Dmitry Stogov
> Cc: php-i18n@lists.php.net
> Subject: Re: [PHP-I18N] Hash api change
>
>
> Hello Dmitry,
>
Hello Dmitry,
you are right about the strign allocation, we have this in 4 and 5 as
well. But a minor change would even captutre that too:
typedef struct bucket {
ulong h;/* Used for numeric indexing */
uint nKeyLength;
void *pData;
void *pDataPtr;
Hi Marcus,
The idea make sense, but note that this modification will need two malloc()
for each bucket with string index.
First for bucket itself and the second for "arKey". (now they are done in
one call)
Also we will lose some performance in dereferencing pointer to arKey in each
ZendHash operat