I'm optimizing the generated V8/DOM bindings in Chrome. One thing I've  
noticed is that any method that returns a JS 'boolean' ends with:
        return result ? v8::True() : v8::False();
Both of those functions call into V8 proper, where they seem to invoke  
a nontrivial amount of code. The same goes for v8::Null() and  
v8::Undefined().

Since these values are, I would imagine, constants, is it possible for  
me to call them once, store them in PersistentHandles, and then re-use  
those cached values? That way I could reduce the above idiom to a  
couple of inlined instructions.

—Jens
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to