On 3/18/2008 9:12 AM, iaminsik wrote:
> On 3=BF=F918=C0=CF, =BF=C0=C8=C410=BD=C311=BA=D0, Ed Morton <mor...@[EMAIL PROTECTED]
> wrote:
<snip>
>>If you want to check for an index being present in an array, use the "i=
n" operator:
>>
>> if (index in array) ...
>>
>>don't create the element then destroy it:
>>
>> if (!array[index])
>> delete array[index]
>=20
>=20
> Yes, this is what I want to know since this Feb.
> If I create an element in 'if' condition and delete it, will the speed
> of program be heavily slower?
> If it be slower, what causes the happening?
> Internal-max-hash-size? or simple 'insert-delete' behavior?
That's a little like asking "if instead of using sub() I write my own fun=
ction
to do substitutions, would it be slower and if so why?". The immediate an=
swer is
"it's pointless to write that code since a better alternative is part of =
the
language so who cares?". Maybe someone who, unlike me, actually does care=
and
knows the answer will respond....
Ed.


|