Jump to content

Object.seal() performance boost?


spleen387
 Share

Recommended Posts

So I've heard some things about Object.seal() being an incredible performance boost, particularly from the Construct2 creators, so I've implemented it in my constructors so that almost all instances are sealed. But I was just wondering when this is beneficial, like does an unsealed array filled with sealed objects iterate faster than an array with unsealed objects? and should a seal instance arrays when I can?

Link to comment
Share on other sites

Would you consider setting up a test on JSPerf?

 

http://jsperf.com

 

I'd love to see some hard data on reproducible test cases.

There are so many factors affecting performance that you need to make sure an apparent performance boost in one area isn't just a patch for a poor architectural decision in another area.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...