You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$array = []; // <== this line differs
for ($i = 0; $i < 100000; ++$i) {
$array[$i] = 0;
}
$array[42] = 42;
$array[420] = 420;
But what if we just skip the initialization part?
What is the STRING_TO_INT type useful for?
Standard PHP arrays are quite efficient in terms of dictionary, how does Judy arrays with STRING_TO_INT type behave in this regards? More memory efficient as well? Less CPU intensive?
Regarding the huge improvements made on PHP arrays in PHP 7, what are the Judy types that would still be relevant if the extension was made compatible with it?
Last question, how does PHP Judy arrays behave when accessing an element that is not set? I think this is also one important point of such type ;-)
I have found in README.md the "how", but not the "why".
Being a "Sparse array" implementation, I would expect that it would be much more memory efficient to do:
over:
But what if we just skip the initialization part?
What is the
STRING_TO_INT
type useful for?Standard PHP arrays are quite efficient in terms of dictionary, how does Judy arrays with
STRING_TO_INT
type behave in this regards? More memory efficient as well? Less CPU intensive?Regarding the huge improvements made on PHP arrays in PHP 7, what are the Judy types that would still be relevant if the extension was made compatible with it?
Last question, how does PHP Judy arrays behave when accessing an element that is not set? I think this is also one important point of such type ;-)
Thanks in advance for your answers @orieg.
The text was updated successfully, but these errors were encountered: