{"action":"created","issue":{"url":"https://api.github.com/repos/iojs/io.js/issues/785","labels_url":"https://api.github.com/repos/iojs/io.js/issues/785/labels{/name}","comments_url":"https://api.github.com/repos/iojs/io.js/issues/785/comments","events_url":"https://api.github.com/repos/iojs/io.js/issues/785/events","html_url":"https://github.com/iojs/io.js/pull/785","id":57213602,"number":785,"title":"events: optimize adding and removing of listeners more","user":{"login":"mscdex","id":54666,"avatar_url":"https://avatars.githubusercontent.com/u/54666?v=3","gravatar_id":"","url":"https://api.github.com/users/mscdex","html_url":"https://github.com/mscdex","followers_url":"https://api.github.com/users/mscdex/followers","following_url":"https://api.github.com/users/mscdex/following{/other_user}","gists_url":"https://api.github.com/users/mscdex/gists{/gist_id}","starred_url":"https://api.github.com/users/mscdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscdex/subscriptions","organizations_url":"https://api.github.com/users/mscdex/orgs","repos_url":"https://api.github.com/users/mscdex/repos","events_url":"https://api.github.com/users/mscdex/events{/privacy}","received_events_url":"https://api.github.com/users/mscdex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-10T18:17:18Z","updated_at":"2015-02-10T21:29:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/iojs/io.js/pulls/785","html_url":"https://github.com/iojs/io.js/pull/785","diff_url":"https://github.com/iojs/io.js/pull/785.diff","patch_url":"https://github.com/iojs/io.js/pull/785.patch"},"body":"These optimizations result in >2x speedup in the ee-add-remove\r\nbenchmark:\r\n\r\n* Don't mutate array.length when removing the last listener for\r\nan event\r\n* Don't bother checking max listeners if listeners isn't an array\r\n* Don't call delete when removing the last event in _events, just\r\nre-assign a new object instead"},"comment":{"url":"https://api.github.com/repos/iojs/io.js/issues/comments/73787591","html_url":"https://github.com/iojs/io.js/pull/785#issuecomment-73787591","issue_url":"https://api.github.com/repos/iojs/io.js/issues/785","id":73787591,"user":{"login":"mscdex","id":54666,"avatar_url":"https://avatars.githubusercontent.com/u/54666?v=3","gravatar_id":"","url":"https://api.github.com/users/mscdex","html_url":"https://github.com/mscdex","followers_url":"https://api.github.com/users/mscdex/followers","following_url":"https://api.github.com/users/mscdex/following{/other_user}","gists_url":"https://api.github.com/users/mscdex/gists{/gist_id}","starred_url":"https://api.github.com/users/mscdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscdex/subscriptions","organizations_url":"https://api.github.com/users/mscdex/orgs","repos_url":"https://api.github.com/users/mscdex/repos","events_url":"https://api.github.com/users/mscdex/events{/privacy}","received_events_url":"https://api.github.com/users/mscdex/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T21:29:06Z","updated_at":"2015-02-10T21:29:06Z","body":"@Fishrock123 Yeah `listeners()` and `listenerCount()` really shouldn't be affected by these changes. It's just \"normal fluctuations.\""}}