{"action":"created","comment":{"url":"https://api.github.com/repos/thlorenz/v8-perf/pulls/comments/181235678","pull_request_review_id":111810176,"id":181235678,"diff_hunk":"@@ -189,53 +226,133 @@ ToSpace starts as unallocated memory.\n \n - now we can allocate E\n \n-#### Write Barriers\n+#### Considerations\n \n-[read](http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection) *Write barriers: the secret ingredient*\n+[watch](https://youtu.be/VhpdsjBUS3g?t=15m30s)\n \n-[barrier](http://www.memorymanagement.org/glossary/b.html#term-barrier-1) | [write\n-barrier](http://www.memorymanagement.org/glossary/w.html#term-write-barrier) | [read\n-barrier](http://www.memorymanagement.org/glossary/r.html#term-read-barrier)\n+- every allocation brings us closer to GC pause\n+- even though as many steps of collection are performed in parallel, **every collection pauses our\n+  app**\n+- try to pre-alloc as much as possible ahead of time","path":"gc.md","position":260,"original_position":260,"commit_id":"0c31ed6294a13cdc964b7542379e7045bb2429ed","original_commit_id":"0c31ed6294a13cdc964b7542379e7045bb2429ed","user":{"login":"ulan","id":294429,"avatar_url":"https://avatars2.githubusercontent.com/u/294429?v=4","gravatar_id":"","url":"https://api.github.com/users/ulan","html_url":"https://github.com/ulan","followers_url":"https://api.github.com/users/ulan/followers","following_url":"https://api.github.com/users/ulan/following{/other_user}","gists_url":"https://api.github.com/users/ulan/gists{/gist_id}","starred_url":"https://api.github.com/users/ulan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulan/subscriptions","organizations_url":"https://api.github.com/users/ulan/orgs","repos_url":"https://api.github.com/users/ulan/repos","events_url":"https://api.github.com/users/ulan/events{/privacy}","received_events_url":"https://api.github.com/users/ulan/received_events","type":"User","site_admin":false},"body":"Pre-allocation as much as possible is in general not a good idea :)\r\nGC complexity depends on the live set. Pre-allocation artificially increases the live set. ","created_at":"2018-04-12T22:04:47Z","updated_at":"2018-04-12T22:34:22Z","html_url":"https://github.com/thlorenz/v8-perf/pull/14#discussion_r181235678","pull_request_url":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/thlorenz/v8-perf/pulls/comments/181235678"},"html":{"href":"https://github.com/thlorenz/v8-perf/pull/14#discussion_r181235678"},"pull_request":{"href":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14","id":181048915,"html_url":"https://github.com/thlorenz/v8-perf/pull/14","diff_url":"https://github.com/thlorenz/v8-perf/pull/14.diff","patch_url":"https://github.com/thlorenz/v8-perf/pull/14.patch","issue_url":"https://api.github.com/repos/thlorenz/v8-perf/issues/14","number":14,"state":"open","locked":false,"title":"turbo: updating all docs to current state","user":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars0.githubusercontent.com/u/192891?v=4","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"body":"## Updating to latest v8\r\n\r\nUpdated all the documents to reflect changes in v8, mainly the compiler chain as well as the garbage collector.\r\n\r\nNumerous documents focus on one topic specifically and I include a quick summary + link to the document below as well as the diff. I did that b/c I feel looking at the diff makes things much harder to read than when looking at the original file, but comments would make sense in the diff.\r\nI'm hoping that the experts from the v8 team and community can review a document that most matches their expertise and point out any information that is not quite correct so I can correct it.\r\n\r\n**Please note that all documents inside the `./crankshaft` folder are the old versions and don't need to be reviewed. Please review the ones at the top level of this repo (and linked below) instead.**\r\n\r\nObviously pull requests are also very welcome :)\r\n\r\n### Compiler\r\n\r\nThe [v8 compiler](https://github.com/thlorenz/v8-perf/blob/turbo-updates/compiler.md) | [diff](https://github.com/thlorenz/v8-perf/compare/turbo-updates?expand=1#diff-b49978087b88c89a5fa214b85931590b) document outlines the v8 compiler pipeline including the\r\nIgnition Interpreter and TurboFan optimizing compiler. It explains how information about your\r\ncode is executed to allow optimizations, how and when deoptimizations occur and how features\r\nlike the CodeStubAssembler allowed reduce performance bottlenecks found in the [older\r\npipeline](https://github.com/thlorenz/v8-perf/blob/turbo-updates/crankshaft/compiler.md).\r\n\r\n### Language Features\r\n\r\nThe [language features](https://github.com/thlorenz/v8-perf/blob/turbo-updates/language-features.md) | [diff](https://github.com/thlorenz/v8-perf/compare/turbo-updates?expand=1#diff-760a1ebc2a62f1b12ce76c6947cd4390) document lists JavaScript language features and\r\nprovides info with regard to their performance mainly to provide assurance that performance of\r\nmost features is no longer an issue as it was with the previous compiler pipeline.\r\n\r\n### Garbage Collector\r\n\r\nThe [v8 garbage collector](https://github.com/thlorenz/v8-perf/blob/turbo-updates/gc.md) | [diff](https://github.com/thlorenz/v8-perf/compare/turbo-updates?expand=1#diff-dd25f7f05abfbcd228db92bb870d89b6) document talks about how memory is organized on the v8 heap,\r\nhow garbage collection is performed and how it was parallelized as much as possible to avoid\r\npausing the main thread more than necessary.\r\n\r\n### Memory Profiling\r\n\r\nThe [memory profiling](https://github.com/thlorenz/v8-perf/blob/turbo-updates/memory-profiling.md) | [diff](https://github.com/thlorenz/v8-perf/compare/turbo-updates?expand=1#diff-e7fe1dc69ba71e2ee2721d647d59b47d) document explains how JavaScript objects are\r\nreferenced to form a tree of nodes which the garbage collector uses to determine _collectable_\r\nobjects. It also outlines numerous techniques to profile memory leaks and allocations.\r\n\r\n### Inspection and Performance Profiling\r\n\r\nInside the [inspection](https://github.com/thlorenz/v8-perf/blob/turbo-updates/inspection.md) | [diff](https://github.com/thlorenz/v8-perf/compare/turbo-updates?expand=1#diff-1ab137d931a59172f302cba93e8e965a) document you will find techniques that allow you to\r\nprofile your Node.js or web app, how to produce flamegraphs and what flags and tools are\r\navailable to gain an insight into operations of v8 itself.\r\n\r\n### Snapshots and Code Caching\r\n\r\n[This document](https://github.com/thlorenz/v8-perf/blob/turbo-updates/snapshots+code-caching.md) | [diff](https://github.com/thlorenz/v8-perf/compare/turbo-updates?expand=1#diff-4c875c24d36e23ba24b060d46e9f6067) includes information as to how v8 uses caching\r\ntechniques in order to avoid recompiling scripts during initialization and thus achieve faster\r\nstartup times.\r\n\r\n### Runtime Functions\r\n\r\nThe [runtime functions](https://github.com/thlorenz/v8-perf/blob/turbo-updates/runtime-functions.md) | [diff](https://github.com/thlorenz/v8-perf/compare/turbo-updates?expand=1#diff-82eb773b939d6a4a0b9c673cb78c2689) document gives a quick intro into C++ functions\r\naccessible from JavaScript that can be used to provide information of the v8 engine as well as\r\ndirect it to take a specific action like optimize a function on next call.\r\n\r\ncc @mraleph @bmeurer @mcollina @mathiasbynens @fhinkel @ofrobots\r\n\r\nI realize these are by no means all people knowledgable about these topics, so please feel free to add more via a comment.\r\n\r\nI very much appreciate anyone taking the time to help make this a valuable resource with correct and up to date information.","created_at":"2018-04-11T22:52:09Z","updated_at":"2018-04-12T22:34:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e27b7bc9f79e09cd0126f0594b13aa2512fd7469","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14/commits","review_comments_url":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14/comments","review_comment_url":"https://api.github.com/repos/thlorenz/v8-perf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thlorenz/v8-perf/issues/14/comments","statuses_url":"https://api.github.com/repos/thlorenz/v8-perf/statuses/0c31ed6294a13cdc964b7542379e7045bb2429ed","head":{"label":"thlorenz:turbo-updates","ref":"turbo-updates","sha":"0c31ed6294a13cdc964b7542379e7045bb2429ed","user":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars0.githubusercontent.com/u/192891?v=4","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"repo":{"id":20495349,"name":"v8-perf","full_name":"thlorenz/v8-perf","owner":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars0.githubusercontent.com/u/192891?v=4","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thlorenz/v8-perf","description":"⏱️ Notes and resources related to v8 and thus Node.js performance","fork":false,"url":"https://api.github.com/repos/thlorenz/v8-perf","forks_url":"https://api.github.com/repos/thlorenz/v8-perf/forks","keys_url":"https://api.github.com/repos/thlorenz/v8-perf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thlorenz/v8-perf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thlorenz/v8-perf/teams","hooks_url":"https://api.github.com/repos/thlorenz/v8-perf/hooks","issue_events_url":"https://api.github.com/repos/thlorenz/v8-perf/issues/events{/number}","events_url":"https://api.github.com/repos/thlorenz/v8-perf/events","assignees_url":"https://api.github.com/repos/thlorenz/v8-perf/assignees{/user}","branches_url":"https://api.github.com/repos/thlorenz/v8-perf/branches{/branch}","tags_url":"https://api.github.com/repos/thlorenz/v8-perf/tags","blobs_url":"https://api.github.com/repos/thlorenz/v8-perf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thlorenz/v8-perf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thlorenz/v8-perf/git/refs{/sha}","trees_url":"https://api.github.com/repos/thlorenz/v8-perf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thlorenz/v8-perf/statuses/{sha}","languages_url":"https://api.github.com/repos/thlorenz/v8-perf/languages","stargazers_url":"https://api.github.com/repos/thlorenz/v8-perf/stargazers","contributors_url":"https://api.github.com/repos/thlorenz/v8-perf/contributors","subscribers_url":"https://api.github.com/repos/thlorenz/v8-perf/subscribers","subscription_url":"https://api.github.com/repos/thlorenz/v8-perf/subscription","commits_url":"https://api.github.com/repos/thlorenz/v8-perf/commits{/sha}","git_commits_url":"https://api.github.com/repos/thlorenz/v8-perf/git/commits{/sha}","comments_url":"https://api.github.com/repos/thlorenz/v8-perf/comments{/number}","issue_comment_url":"https://api.github.com/repos/thlorenz/v8-perf/issues/comments{/number}","contents_url":"https://api.github.com/repos/thlorenz/v8-perf/contents/{+path}","compare_url":"https://api.github.com/repos/thlorenz/v8-perf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thlorenz/v8-perf/merges","archive_url":"https://api.github.com/repos/thlorenz/v8-perf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thlorenz/v8-perf/downloads","issues_url":"https://api.github.com/repos/thlorenz/v8-perf/issues{/number}","pulls_url":"https://api.github.com/repos/thlorenz/v8-perf/pulls{/number}","milestones_url":"https://api.github.com/repos/thlorenz/v8-perf/milestones{/number}","notifications_url":"https://api.github.com/repos/thlorenz/v8-perf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thlorenz/v8-perf/labels{/name}","releases_url":"https://api.github.com/repos/thlorenz/v8-perf/releases{/id}","deployments_url":"https://api.github.com/repos/thlorenz/v8-perf/deployments","created_at":"2014-06-04T18:43:14Z","updated_at":"2018-04-12T17:00:39Z","pushed_at":"2018-04-12T18:04:14Z","git_url":"git://github.com/thlorenz/v8-perf.git","ssh_url":"git@github.com:thlorenz/v8-perf.git","clone_url":"https://github.com/thlorenz/v8-perf.git","svn_url":"https://github.com/thlorenz/v8-perf","homepage":"","size":13982,"stargazers_count":799,"watchers_count":799,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":49,"open_issues":11,"watchers":799,"default_branch":"master"}},"base":{"label":"thlorenz:master","ref":"master","sha":"04b392e858da10e2e81959b7e81569ac6110d2e2","user":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars0.githubusercontent.com/u/192891?v=4","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"repo":{"id":20495349,"name":"v8-perf","full_name":"thlorenz/v8-perf","owner":{"login":"thlorenz","id":192891,"avatar_url":"https://avatars0.githubusercontent.com/u/192891?v=4","gravatar_id":"","url":"https://api.github.com/users/thlorenz","html_url":"https://github.com/thlorenz","followers_url":"https://api.github.com/users/thlorenz/followers","following_url":"https://api.github.com/users/thlorenz/following{/other_user}","gists_url":"https://api.github.com/users/thlorenz/gists{/gist_id}","starred_url":"https://api.github.com/users/thlorenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlorenz/subscriptions","organizations_url":"https://api.github.com/users/thlorenz/orgs","repos_url":"https://api.github.com/users/thlorenz/repos","events_url":"https://api.github.com/users/thlorenz/events{/privacy}","received_events_url":"https://api.github.com/users/thlorenz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thlorenz/v8-perf","description":"⏱️ Notes and resources related to v8 and thus Node.js performance","fork":false,"url":"https://api.github.com/repos/thlorenz/v8-perf","forks_url":"https://api.github.com/repos/thlorenz/v8-perf/forks","keys_url":"https://api.github.com/repos/thlorenz/v8-perf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thlorenz/v8-perf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thlorenz/v8-perf/teams","hooks_url":"https://api.github.com/repos/thlorenz/v8-perf/hooks","issue_events_url":"https://api.github.com/repos/thlorenz/v8-perf/issues/events{/number}","events_url":"https://api.github.com/repos/thlorenz/v8-perf/events","assignees_url":"https://api.github.com/repos/thlorenz/v8-perf/assignees{/user}","branches_url":"https://api.github.com/repos/thlorenz/v8-perf/branches{/branch}","tags_url":"https://api.github.com/repos/thlorenz/v8-perf/tags","blobs_url":"https://api.github.com/repos/thlorenz/v8-perf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thlorenz/v8-perf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thlorenz/v8-perf/git/refs{/sha}","trees_url":"https://api.github.com/repos/thlorenz/v8-perf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thlorenz/v8-perf/statuses/{sha}","languages_url":"https://api.github.com/repos/thlorenz/v8-perf/languages","stargazers_url":"https://api.github.com/repos/thlorenz/v8-perf/stargazers","contributors_url":"https://api.github.com/repos/thlorenz/v8-perf/contributors","subscribers_url":"https://api.github.com/repos/thlorenz/v8-perf/subscribers","subscription_url":"https://api.github.com/repos/thlorenz/v8-perf/subscription","commits_url":"https://api.github.com/repos/thlorenz/v8-perf/commits{/sha}","git_commits_url":"https://api.github.com/repos/thlorenz/v8-perf/git/commits{/sha}","comments_url":"https://api.github.com/repos/thlorenz/v8-perf/comments{/number}","issue_comment_url":"https://api.github.com/repos/thlorenz/v8-perf/issues/comments{/number}","contents_url":"https://api.github.com/repos/thlorenz/v8-perf/contents/{+path}","compare_url":"https://api.github.com/repos/thlorenz/v8-perf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thlorenz/v8-perf/merges","archive_url":"https://api.github.com/repos/thlorenz/v8-perf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thlorenz/v8-perf/downloads","issues_url":"https://api.github.com/repos/thlorenz/v8-perf/issues{/number}","pulls_url":"https://api.github.com/repos/thlorenz/v8-perf/pulls{/number}","milestones_url":"https://api.github.com/repos/thlorenz/v8-perf/milestones{/number}","notifications_url":"https://api.github.com/repos/thlorenz/v8-perf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thlorenz/v8-perf/labels{/name}","releases_url":"https://api.github.com/repos/thlorenz/v8-perf/releases{/id}","deployments_url":"https://api.github.com/repos/thlorenz/v8-perf/deployments","created_at":"2014-06-04T18:43:14Z","updated_at":"2018-04-12T17:00:39Z","pushed_at":"2018-04-12T18:04:14Z","git_url":"git://github.com/thlorenz/v8-perf.git","ssh_url":"git@github.com:thlorenz/v8-perf.git","clone_url":"https://github.com/thlorenz/v8-perf.git","svn_url":"https://github.com/thlorenz/v8-perf","homepage":"","size":13982,"stargazers_count":799,"watchers_count":799,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":49,"open_issues":11,"watchers":799,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14"},"html":{"href":"https://github.com/thlorenz/v8-perf/pull/14"},"issue":{"href":"https://api.github.com/repos/thlorenz/v8-perf/issues/14"},"comments":{"href":"https://api.github.com/repos/thlorenz/v8-perf/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/thlorenz/v8-perf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thlorenz/v8-perf/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/thlorenz/v8-perf/statuses/0c31ed6294a13cdc964b7542379e7045bb2429ed"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ulan"}}