{"action":"created","issue":{"url":"https://api.github.com/repos/yoshuawuyts/nanotask/issues/1","repository_url":"https://api.github.com/repos/yoshuawuyts/nanotask","labels_url":"https://api.github.com/repos/yoshuawuyts/nanotask/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/yoshuawuyts/nanotask/issues/1/comments","events_url":"https://api.github.com/repos/yoshuawuyts/nanotask/issues/1/events","html_url":"https://github.com/yoshuawuyts/nanotask/issues/1","id":261034230,"node_id":"MDU6SXNzdWUyNjEwMzQyMzA=","number":1,"title":"Tiny improvement to performance","user":{"login":"staltz","id":90512,"node_id":"MDQ6VXNlcjkwNTEy","avatar_url":"https://avatars3.githubusercontent.com/u/90512?v=4","gravatar_id":"","url":"https://api.github.com/users/staltz","html_url":"https://github.com/staltz","followers_url":"https://api.github.com/users/staltz/followers","following_url":"https://api.github.com/users/staltz/following{/other_user}","gists_url":"https://api.github.com/users/staltz/gists{/gist_id}","starred_url":"https://api.github.com/users/staltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staltz/subscriptions","organizations_url":"https://api.github.com/users/staltz/orgs","repos_url":"https://api.github.com/users/staltz/repos","events_url":"https://api.github.com/users/staltz/events{/privacy}","received_events_url":"https://api.github.com/users/staltz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-27T16:14:54Z","updated_at":"2018-06-03T11:48:14Z","closed_at":"2018-06-03T11:48:00Z","author_association":"COLLABORATOR","body":"Just in case you're interested in squeezing this package a bit more:\r\n\r\n`i = 1 - i` is faster than `i = ++i % 2` on Safari and Firefox, while being basically the same on Chrome.\r\n\r\n<img width=\"550\" alt=\"screen shot 2017-09-27 at 19 05 17\" src=\"https://user-images.githubusercontent.com/90512/30924262-e8789912-a3b6-11e7-84f4-2605942739a2.png\">\r\n\r\nhttps://jsperf.com/bit-flip/1\r\n\r\n- - -\r\n\r\nAnd \r\n\r\n```js\r\nfor (var i = 0; i < queue.length; i++) queue[i]()\r\nqueue = []\r\n```\r\n\r\nchanged to\r\n\r\n```js\r\nwhile (queue.length) queue.shift()()\r\n```\r\n\r\nsaves us from reallocating a new array, and saves in code size.\r\n\r\nShould be a bit faster too\r\n\r\n<img width=\"714\" alt=\"screen shot 2017-09-27 at 19 12 38\" src=\"https://user-images.githubusercontent.com/90512/30924660-15609172-a3b8-11e7-8696-632112029aa3.png\">\r\n\r\nhttps://jsperf.com/array-realloc/1\r\n\r\nBut I'm not so confident the jsperf in this case correctly reflects what happens in nanotask.\r\n"},"comment":{"url":"https://api.github.com/repos/yoshuawuyts/nanotask/issues/comments/394156669","html_url":"https://github.com/yoshuawuyts/nanotask/issues/1#issuecomment-394156669","issue_url":"https://api.github.com/repos/yoshuawuyts/nanotask/issues/1","id":394156669,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDE1NjY2OQ==","user":{"login":"staltz","id":90512,"node_id":"MDQ6VXNlcjkwNTEy","avatar_url":"https://avatars3.githubusercontent.com/u/90512?v=4","gravatar_id":"","url":"https://api.github.com/users/staltz","html_url":"https://github.com/staltz","followers_url":"https://api.github.com/users/staltz/followers","following_url":"https://api.github.com/users/staltz/following{/other_user}","gists_url":"https://api.github.com/users/staltz/gists{/gist_id}","starred_url":"https://api.github.com/users/staltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staltz/subscriptions","organizations_url":"https://api.github.com/users/staltz/orgs","repos_url":"https://api.github.com/users/staltz/repos","events_url":"https://api.github.com/users/staltz/events{/privacy}","received_events_url":"https://api.github.com/users/staltz/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T11:48:14Z","updated_at":"2018-06-03T11:48:14Z","author_association":"COLLABORATOR","body":"Fixed this, you can issue a new version if you want :)"}}
{"actor":{"display_login":"staltz"}}