FWIW, I'd put that concern in the "don't optimize too early" category.
 My personal technique is to code the easiest way possible, see if
there are speed problems (which is rare) and then fix slow parts.
YMMV.

I know you didn't ask my opinion, just saying.  I'm sorry I can't
answer your real question.

On Mon, Jul 16, 2012 at 6:52 AM, Tim Caswell <[email protected]> wrote:
> The place where I avoid delete in node code is in "class instances".
> (where "class" means a constructor and the "instance" is  the result
> of using `new`) From my understanding of the VM, delete causes V8 to
> bail out of the hidden classes optimizations making all property
> lookups much slower forever on that object.  So I only delete on
> objects that are pure data structures and not on instances of classes
> that I'll have thousands of similar objects.  Someone more familiar
> with the current state of V8 can comment more intelligently.
>
> On Sun, Jul 15, 2012 at 9:22 PM, Mark Hahn <[email protected]> wrote:
>>>  However, the delete operator is inefficient, and generally disreccomended 
>>> for performant V8 JavaScript.
>>
>> Surely there wouldn't be enough deletes per request to be able to
>> notice a performance hit.  I think you are comparing microseconds to
>> milliseconds.
>>
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to