Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: Memory leak...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 13 Topic 2195 of 2317
Post > Topic >>

Re: Memory leak of iterations in large hash.

by Ed Morton <morton@[EMAIL PROTECTED] > Mar 18, 2008 at 09:37 AM

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.
 




 13 Posts in Topic:
Memory leak of iterations in large hash.
iaminsik <iaminsik@[EM  2008-03-17 20:29:41 
Re: Memory leak of iterations in large hash.
Joel Reicher <joel@[EM  2008-03-18 03:41:41 
Re: Memory leak of iterations in large hash.
iaminsik <iaminsik@[EM  2008-03-17 21:30:04 
Re: Memory leak of iterations in large hash.
Ed Morton <morton@[EMA  2008-03-18 06:43:13 
Re: Memory leak of iterations in large hash.
iaminsik <iaminsik@[EM  2008-03-18 05:53:41 
Re: Memory leak of iterations in large hash.
Ed Morton <morton@[EMA  2008-03-18 08:11:13 
Re: Memory leak of iterations in large hash.
iaminsik <iaminsik@[EM  2008-03-18 07:12:18 
Re: Memory leak of iterations in large hash.
Ed Morton <morton@[EMA  2008-03-18 09:37:42 
Re: Memory leak of iterations in large hash.
iaminsik <iaminsik@[EM  2008-03-18 07:57:27 
Re: Memory leak of iterations in large hash.
mjc <mjcohen@[EMAIL PR  2008-03-18 12:56:51 
Re: Memory leak of iterations in large hash.
iaminsik <iaminsik@[EM  2008-03-19 07:13:28 
Re: Memory leak of iterations in large hash.
gazelle@[EMAIL PROTECTED]  2008-03-19 14:31:33 
Re: Memory leak of iterations in large hash.
iaminsik <iaminsik@[EM  2008-03-24 21:02:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 15:12:12 CDT 2008.