Skip to content

Conversation

@no-longer-on-githu-b
Copy link
Contributor

@no-longer-on-githu-b no-longer-on-githu-b commented Sep 16, 2016

For:

for (var i = 0; i < 1e6; ++i) {
  var x = defer(function() {
    return 1;
  });
  for (var j = 0; j < 100; ++j) {
    x.force();
    x.force();
    x.force();
    x.force();
  }
}

I get 16 seconds with delete and 9 seconds with null, consistently, in Chrome.

delete causes V8 to change the object representation to a more
inefficient one.

Fixes #15.
@garyb garyb merged commit b5a5dca into purescript:master Sep 18, 2016
@garyb
Copy link
Member

garyb commented Sep 18, 2016

I thought I'd made this change a while back actually. delete should be avoided at all costs unless the thing is going to be checked with hasOwnProperty!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants