[Development] QML, v8 and freezing the global object

Thomas McGuire thomas.mcguire at kdab.com
Fri Oct 12 13:39:07 CEST 2012


Hi,

On Thursday 11 October 2012 17:36:55 Harri Porten wrote:
> On Thu, 11 Oct 2012, Thomas McGuire wrote:
> > Could we maybe simple get rid of object freezing, and not freeze the
> > global object?
> > What would the consequences of that be, anything bad? I am the opinion
> > that if the user wants to override the "console" object, let him. Maybe
> > there were other reasons for freezing the global object though?
> 
> My guesses for a possible difference: performance of script execution.
> Once the global object is frozen the JIT compiler can make certain
> assumptions that otherwise are not possible.

Seems that in v8, the exact opposite will happen, and property lookup is 
actually 94% slower, according to
http://jsperf.com/prototype-property-lookup-frozen

Regards,
Thomas
-- 
** Qt Developer Conference: http://qtconference.kdab.com/ **

Thomas McGuire | thomas.mcguire at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3637 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121012/880a6c8c/attachment.bin>


More information about the Development mailing list