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 <m...@hahnca.com> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> 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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to