{"action":"created","comment":{"url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/comments/44013351","id":44013351,"diff_hunk":"@@ -0,0 +1,441 @@\n+// Copyright 2009 the V8 project authors. All rights reserved.\n+// Redistribution and use in source and binary forms, with or without\n+// modification, are permitted provided that the following conditions are\n+// met:\n+//\n+//     * Redistributions of source code must retain the above copyright\n+//       notice, this list of conditions and the following disclaimer.\n+//     * Redistributions in binary form must reproduce the above\n+//       copyright notice, this list of conditions and the following\n+//       disclaimer in the documentation and/or other materials provided\n+//       with the distribution.\n+//     * Neither the name of Google Inc. nor the names of its\n+//       contributors may be used to endorse or promote products derived\n+//       from this software without specific prior written permission.\n+//\n+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+// This benchmark is based on a JavaScript log processing module used\n+// by the V8 profiler to generate execution time profiles for runs of\n+// JavaScript applications, and it effectively measures how fast the\n+// JavaScript engine is at allocating nodes and reclaiming the memory\n+// used for old nodes. Because of the way splay trees work, the engine\n+// also has to deal with a lot of changes to the large tree object\n+// graph.\n+\n+// Configuration.\n+var kSplayTreeSize = 8000;\n+var kSplayTreeModifications = 80;\n+var kSplayTreePayloadDepth = 5;\n+\n+var splayTree = null;\n+var splaySampleTimeStart = 0.0;\n+\n+function GeneratePayloadTree(depth, tag) {\n+  if (depth == 0) {\n+    return {\n+      array  : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],\n+      string : 'String for key ' + tag + ' in leaf node'\n+    };\n+  } else {\n+    return {\n+      left:  GeneratePayloadTree(depth - 1, tag),\n+      right: GeneratePayloadTree(depth - 1, tag)\n+    };\n+  }\n+}\n+\n+\n+function GenerateKey() {\n+  // The benchmark framework guarantees that Math.random is\n+  // deterministic; see base.js.\n+  return Math.random();","path":"common/reference/splay.js","position":62,"original_position":62,"commit_id":"20c041d3680333adee22e481a1e16c27af1409f8","original_commit_id":"20c041d3680333adee22e481a1e16c27af1409f8","user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"body":"I don't see no `base.js`.","created_at":"2015-11-05T13:58:58Z","updated_at":"2015-11-05T13:58:58Z","html_url":"https://github.com/sjrd/scalajs-benchmarks/pull/1#discussion_r44013351","pull_request_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/comments/44013351"},"html":{"href":"https://github.com/sjrd/scalajs-benchmarks/pull/1#discussion_r44013351"},"pull_request":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1","id":49825085,"html_url":"https://github.com/sjrd/scalajs-benchmarks/pull/1","diff_url":"https://github.com/sjrd/scalajs-benchmarks/pull/1.diff","patch_url":"https://github.com/sjrd/scalajs-benchmarks/pull/1.patch","issue_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/issues/1","number":1,"state":"open","locked":false,"title":"Add Splay benchmark.","user":{"login":"nicolasstucki","id":3648029,"avatar_url":"https://avatars.githubusercontent.com/u/3648029?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasstucki","html_url":"https://github.com/nicolasstucki","followers_url":"https://api.github.com/users/nicolasstucki/followers","following_url":"https://api.github.com/users/nicolasstucki/following{/other_user}","gists_url":"https://api.github.com/users/nicolasstucki/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasstucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasstucki/subscriptions","organizations_url":"https://api.github.com/users/nicolasstucki/orgs","repos_url":"https://api.github.com/users/nicolasstucki/repos","events_url":"https://api.github.com/users/nicolasstucki/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasstucki/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-05T13:44:11Z","updated_at":"2015-11-05T13:58:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"227c4e0fdb2850bbb00351fb98a4adc3b95e7404","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/issues/1/comments","statuses_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/statuses/20c041d3680333adee22e481a1e16c27af1409f8","head":{"label":"nicolasstucki:splay","ref":"splay","sha":"20c041d3680333adee22e481a1e16c27af1409f8","user":{"login":"nicolasstucki","id":3648029,"avatar_url":"https://avatars.githubusercontent.com/u/3648029?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasstucki","html_url":"https://github.com/nicolasstucki","followers_url":"https://api.github.com/users/nicolasstucki/followers","following_url":"https://api.github.com/users/nicolasstucki/following{/other_user}","gists_url":"https://api.github.com/users/nicolasstucki/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasstucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasstucki/subscriptions","organizations_url":"https://api.github.com/users/nicolasstucki/orgs","repos_url":"https://api.github.com/users/nicolasstucki/repos","events_url":"https://api.github.com/users/nicolasstucki/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasstucki/received_events","type":"User","site_admin":false},"repo":{"id":45382692,"name":"scalajs-benchmarks","full_name":"nicolasstucki/scalajs-benchmarks","owner":{"login":"nicolasstucki","id":3648029,"avatar_url":"https://avatars.githubusercontent.com/u/3648029?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasstucki","html_url":"https://github.com/nicolasstucki","followers_url":"https://api.github.com/users/nicolasstucki/followers","following_url":"https://api.github.com/users/nicolasstucki/following{/other_user}","gists_url":"https://api.github.com/users/nicolasstucki/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasstucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasstucki/subscriptions","organizations_url":"https://api.github.com/users/nicolasstucki/orgs","repos_url":"https://api.github.com/users/nicolasstucki/repos","events_url":"https://api.github.com/users/nicolasstucki/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasstucki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicolasstucki/scalajs-benchmarks","description":"Scala.js Benchmarks","fork":true,"url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks","forks_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/forks","keys_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/teams","hooks_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/hooks","issue_events_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/issues/events{/number}","events_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/events","assignees_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/assignees{/user}","branches_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/branches{/branch}","tags_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/tags","blobs_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/statuses/{sha}","languages_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/languages","stargazers_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/stargazers","contributors_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/contributors","subscribers_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/subscribers","subscription_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/subscription","commits_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/contents/{+path}","compare_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/merges","archive_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/downloads","issues_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/issues{/number}","pulls_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/pulls{/number}","milestones_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/milestones{/number}","notifications_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/labels{/name}","releases_url":"https://api.github.com/repos/nicolasstucki/scalajs-benchmarks/releases{/id}","created_at":"2015-11-02T08:51:22Z","updated_at":"2015-11-02T08:51:22Z","pushed_at":"2015-11-05T13:43:03Z","git_url":"git://github.com/nicolasstucki/scalajs-benchmarks.git","ssh_url":"git@github.com:nicolasstucki/scalajs-benchmarks.git","clone_url":"https://github.com/nicolasstucki/scalajs-benchmarks.git","svn_url":"https://github.com/nicolasstucki/scalajs-benchmarks","homepage":null,"size":385,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sjrd:master","ref":"master","sha":"00fc8808c621c1ee7fa01882e6d4ffc8c8aec294","user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"repo":{"id":13674336,"name":"scalajs-benchmarks","full_name":"sjrd/scalajs-benchmarks","owner":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sjrd/scalajs-benchmarks","description":"Scala.js Benchmarks","fork":true,"url":"https://api.github.com/repos/sjrd/scalajs-benchmarks","forks_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/forks","keys_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/teams","hooks_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/hooks","issue_events_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/issues/events{/number}","events_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/events","assignees_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/assignees{/user}","branches_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/branches{/branch}","tags_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/tags","blobs_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/git/refs{/sha}","trees_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/statuses/{sha}","languages_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/languages","stargazers_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/stargazers","contributors_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/contributors","subscribers_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/subscribers","subscription_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/subscription","commits_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/commits{/sha}","git_commits_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/git/commits{/sha}","comments_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/comments{/number}","issue_comment_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/issues/comments{/number}","contents_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/contents/{+path}","compare_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/merges","archive_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/downloads","issues_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/issues{/number}","pulls_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls{/number}","milestones_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/milestones{/number}","notifications_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/labels{/name}","releases_url":"https://api.github.com/repos/sjrd/scalajs-benchmarks/releases{/id}","created_at":"2013-10-18T09:37:07Z","updated_at":"2015-09-29T06:05:11Z","pushed_at":"2015-11-05T13:44:12Z","git_url":"git://github.com/sjrd/scalajs-benchmarks.git","ssh_url":"git@github.com:sjrd/scalajs-benchmarks.git","clone_url":"https://github.com/sjrd/scalajs-benchmarks.git","svn_url":"https://github.com/sjrd/scalajs-benchmarks","homepage":null,"size":492,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1"},"html":{"href":"https://github.com/sjrd/scalajs-benchmarks/pull/1"},"issue":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/issues/1"},"comments":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sjrd/scalajs-benchmarks/statuses/20c041d3680333adee22e481a1e16c27af1409f8"}}}}