Sorry, I wasn't clear. By 'internally' I'm referring to within the javascript engine - or better yet, within the space that the javascript engine is initialized in. As for arrays/objects this is a reference to their data structure within this system, not as they're represented in a script. By 'less to them internally' I'm referring to the differences in the data structure of an object, and the steps taken when one is created. I'm not exactly sure of what is allocated when a javascript array is created internally within v8, but I will go out on a limb and guess less then that of an object, plus objects must be checked for constructors and so forth when created. v8 probably checks first to see if an object contains methods of it's own before looking for a constructor, but this too is a step not needed with an array.
By API I'm referring to the framework provided by v8 for creating objects within the engine, not within the script. They are not introduced into scriptspace unless returned by the procedure that created them or are somehow otherwise placed somewhere accessible to objects in scriptspace. >> The only way to be sure whether or not something affects your application is to try both and measure the difference. If you can't measure it, it's not relevant. Yes, but it's quicker and more sensible to ask those who already know ;) I enjoy experimenting on my free time, but at this point I have 30+ hours into a procedure that converts a hashtable from C into javascript objects and javascript objects into the hashtable structure. I'd rather not write it twice if not needed. And I have to disagree, it is very possible at this level for things that I can't measure to become relevant. The procedure is likely to be called hundreds of times in a minute on largely variyng sets of data. -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
