{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/6893","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/6893/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/6893/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/6893/events","html_url":"https://github.com/nodejs/node/pull/6893","id":155928624,"number":6893,"title":"buffer: improve creation performance","user":{"login":"RReverser","id":557590,"avatar_url":"https://avatars.githubusercontent.com/u/557590?v=3","gravatar_id":"","url":"https://api.github.com/users/RReverser","html_url":"https://github.com/RReverser","followers_url":"https://api.github.com/users/RReverser/followers","following_url":"https://api.github.com/users/RReverser/following{/other_user}","gists_url":"https://api.github.com/users/RReverser/gists{/gist_id}","starred_url":"https://api.github.com/users/RReverser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RReverser/subscriptions","organizations_url":"https://api.github.com/users/RReverser/orgs","repos_url":"https://api.github.com/users/RReverser/repos","events_url":"https://api.github.com/users/RReverser/events{/privacy}","received_events_url":"https://api.github.com/users/RReverser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/buffer","name":"buffer","color":"f7c6c7"},{"url":"https://api.github.com/repos/nodejs/node/labels/c++","name":"c++","color":"e11d21"},{"url":"https://api.github.com/repos/nodejs/node/labels/performance","name":"performance","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":44,"created_at":"2016-05-20T10:01:59Z","updated_at":"2016-05-31T18:17:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/6893","html_url":"https://github.com/nodejs/node/pull/6893","diff_url":"https://github.com/nodejs/node/pull/6893.diff","patch_url":"https://github.com/nodejs/node/pull/6893.patch"},"body":"<!--\r\nThank you for your pull request. Please review below requirements and walk\r\nthrough the checklist. You can 'tick' a box by using the letter \"x\": [x].\r\n\r\nRun the test suite with: `make -j4 test` on UNIX or `vcbuild test nosign` on\r\nWindows.\r\n\r\nIf this aims to fix a regression or you’re adding a feature, make sure you also\r\nwrite a test. If possible, include a benchmark that quantifies your changes.\r\n\r\nFinally, read through our contributors guide and make adjustments as necessary:\r\nhttps://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- remove lines that do not apply to you -->\r\n\r\n- [x] tests and code linting passes\r\n- [x] the commit message follows commit guidelines\r\n\r\n\r\n##### Affected core subsystem(s)\r\nbuffer\r\n\r\n\r\n##### Description of change\r\n<!-- provide a description of the change below this comment -->\r\n\r\nImproves performance of allocating unsafe buffers, creating buffers from\r\nan existing ArrayBuffer and creating .slice(...) from existing Buffer by\r\navoiding deoptimizing change of prototype after Uint8Array allocation\r\nin favor of ES6 native subclassing.\r\n\r\nThis is done through an internal ES6 class that extends Uint8Array and\r\nis used for allocations, but the regular Buffer function is exposed, so\r\ncalling Buffer(...) with or without `new` continues to work as usual\r\nand prototype chains are also preserved.\r\n\r\nPerformance wins for .slice are +120% (2.2x), and, consequently, for\r\nunsafe allocations up to +95% (1.9x) for small buffers, and for safe\r\nallocations (zero-filled) up to +30% (1.3x).\r\n\r\n![chart](https://cloud.githubusercontent.com/assets/557590/15424358/14f59904-1e7a-11e6-8804-a6b3b12fc3e4.png)"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/222774380","html_url":"https://github.com/nodejs/node/pull/6893#issuecomment-222774380","issue_url":"https://api.github.com/repos/nodejs/node/issues/6893","id":222774380,"user":{"login":"RReverser","id":557590,"avatar_url":"https://avatars.githubusercontent.com/u/557590?v=3","gravatar_id":"","url":"https://api.github.com/users/RReverser","html_url":"https://github.com/RReverser","followers_url":"https://api.github.com/users/RReverser/followers","following_url":"https://api.github.com/users/RReverser/following{/other_user}","gists_url":"https://api.github.com/users/RReverser/gists{/gist_id}","starred_url":"https://api.github.com/users/RReverser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RReverser/subscriptions","organizations_url":"https://api.github.com/users/RReverser/orgs","repos_url":"https://api.github.com/users/RReverser/repos","events_url":"https://api.github.com/users/RReverser/events{/privacy}","received_events_url":"https://api.github.com/users/RReverser/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T18:17:35Z","updated_at":"2016-05-31T18:17:35Z","body":"And here we have conflicts again 😢 \r\n\r\nProbably not rebasing again until someone expresses direct interest to merge it right after that."}}
{"actor":{"display_login":"RReverser"}}