{"action":"closed","number":6,"pull_request":{"url":"https://api.github.com/repos/atilaneves/cerealed/pulls/6","id":41049940,"html_url":"https://github.com/atilaneves/cerealed/pull/6","diff_url":"https://github.com/atilaneves/cerealed/pull/6.diff","patch_url":"https://github.com/atilaneves/cerealed/pull/6.patch","issue_url":"https://api.github.com/repos/atilaneves/cerealed/issues/6","number":6,"state":"closed","locked":false,"title":"Performance boost","user":{"login":"chalucha","id":5941106,"avatar_url":"https://avatars.githubusercontent.com/u/5941106?v=3","gravatar_id":"","url":"https://api.github.com/users/chalucha","html_url":"https://github.com/chalucha","followers_url":"https://api.github.com/users/chalucha/followers","following_url":"https://api.github.com/users/chalucha/following{/other_user}","gists_url":"https://api.github.com/users/chalucha/gists{/gist_id}","starred_url":"https://api.github.com/users/chalucha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalucha/subscriptions","organizations_url":"https://api.github.com/users/chalucha/orgs","repos_url":"https://api.github.com/users/chalucha/repos","events_url":"https://api.github.com/users/chalucha/events{/privacy}","received_events_url":"https://api.github.com/users/chalucha/received_events","type":"User","site_admin":false},"body":"Hi,\r\nas I worked on MQTT client library[0], I've found forum post about cerealed's speed[1], so I tried to make my \"just mqtt\" serialization as fast as msgpack and trying that I found some ways to improve performance of cerealed in specific cases and decided to make a PR for it.\r\n\r\nI took your provided benchmark [2] and made some tuning for strings and byte arrays.\r\n\r\nThe test went from (DMD debug):\r\nCerealed: 5 secs, 926 ms, 824 μs, and 5 hnsecs\r\nMsgPack:  2 secs, 226 ms, 575 μs, and 3 hnsecs\r\n\r\nTo:\r\nCerealed: 2 secs, 667 ms, 188 μs, and 3 hnsecs\r\nMsgPack:  2 secs, 159 ms, 598 μs, and 1 hnsec\r\n\r\nWhich I like, so I hope this helps somehow. There are probably some other possible ways to tune it a bit more for other cases too.\r\n\r\n[0] https://github.com/chalucha/vibe-mqtt\r\n[1] http://forum.dlang.org/post/kceyzhlcumjxlfwbhcfr@forum.dlang.org\r\n[2] http://dpaste.dzfl.pl/17b0ed9c0204","created_at":"2015-07-28T19:24:03Z","updated_at":"2015-07-30T10:14:02Z","closed_at":"2015-07-30T10:14:02Z","merged_at":"2015-07-30T10:14:02Z","merge_commit_sha":"a2131d9626f76563d24ce3a8b3a2e8ff6f36d5f7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atilaneves/cerealed/pulls/6/commits","review_comments_url":"https://api.github.com/repos/atilaneves/cerealed/pulls/6/comments","review_comment_url":"https://api.github.com/repos/atilaneves/cerealed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atilaneves/cerealed/issues/6/comments","statuses_url":"https://api.github.com/repos/atilaneves/cerealed/statuses/034d6e7652a3ddaf99060f0a266280e3520936c8","head":{"label":"chalucha:speedup","ref":"speedup","sha":"034d6e7652a3ddaf99060f0a266280e3520936c8","user":{"login":"chalucha","id":5941106,"avatar_url":"https://avatars.githubusercontent.com/u/5941106?v=3","gravatar_id":"","url":"https://api.github.com/users/chalucha","html_url":"https://github.com/chalucha","followers_url":"https://api.github.com/users/chalucha/followers","following_url":"https://api.github.com/users/chalucha/following{/other_user}","gists_url":"https://api.github.com/users/chalucha/gists{/gist_id}","starred_url":"https://api.github.com/users/chalucha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalucha/subscriptions","organizations_url":"https://api.github.com/users/chalucha/orgs","repos_url":"https://api.github.com/users/chalucha/repos","events_url":"https://api.github.com/users/chalucha/events{/privacy}","received_events_url":"https://api.github.com/users/chalucha/received_events","type":"User","site_admin":false},"repo":{"id":39848539,"name":"cerealed","full_name":"chalucha/cerealed","owner":{"login":"chalucha","id":5941106,"avatar_url":"https://avatars.githubusercontent.com/u/5941106?v=3","gravatar_id":"","url":"https://api.github.com/users/chalucha","html_url":"https://github.com/chalucha","followers_url":"https://api.github.com/users/chalucha/followers","following_url":"https://api.github.com/users/chalucha/following{/other_user}","gists_url":"https://api.github.com/users/chalucha/gists{/gist_id}","starred_url":"https://api.github.com/users/chalucha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalucha/subscriptions","organizations_url":"https://api.github.com/users/chalucha/orgs","repos_url":"https://api.github.com/users/chalucha/repos","events_url":"https://api.github.com/users/chalucha/events{/privacy}","received_events_url":"https://api.github.com/users/chalucha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chalucha/cerealed","description":"Serialisation library for D","fork":true,"url":"https://api.github.com/repos/chalucha/cerealed","forks_url":"https://api.github.com/repos/chalucha/cerealed/forks","keys_url":"https://api.github.com/repos/chalucha/cerealed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chalucha/cerealed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chalucha/cerealed/teams","hooks_url":"https://api.github.com/repos/chalucha/cerealed/hooks","issue_events_url":"https://api.github.com/repos/chalucha/cerealed/issues/events{/number}","events_url":"https://api.github.com/repos/chalucha/cerealed/events","assignees_url":"https://api.github.com/repos/chalucha/cerealed/assignees{/user}","branches_url":"https://api.github.com/repos/chalucha/cerealed/branches{/branch}","tags_url":"https://api.github.com/repos/chalucha/cerealed/tags","blobs_url":"https://api.github.com/repos/chalucha/cerealed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chalucha/cerealed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chalucha/cerealed/git/refs{/sha}","trees_url":"https://api.github.com/repos/chalucha/cerealed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chalucha/cerealed/statuses/{sha}","languages_url":"https://api.github.com/repos/chalucha/cerealed/languages","stargazers_url":"https://api.github.com/repos/chalucha/cerealed/stargazers","contributors_url":"https://api.github.com/repos/chalucha/cerealed/contributors","subscribers_url":"https://api.github.com/repos/chalucha/cerealed/subscribers","subscription_url":"https://api.github.com/repos/chalucha/cerealed/subscription","commits_url":"https://api.github.com/repos/chalucha/cerealed/commits{/sha}","git_commits_url":"https://api.github.com/repos/chalucha/cerealed/git/commits{/sha}","comments_url":"https://api.github.com/repos/chalucha/cerealed/comments{/number}","issue_comment_url":"https://api.github.com/repos/chalucha/cerealed/issues/comments{/number}","contents_url":"https://api.github.com/repos/chalucha/cerealed/contents/{+path}","compare_url":"https://api.github.com/repos/chalucha/cerealed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chalucha/cerealed/merges","archive_url":"https://api.github.com/repos/chalucha/cerealed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chalucha/cerealed/downloads","issues_url":"https://api.github.com/repos/chalucha/cerealed/issues{/number}","pulls_url":"https://api.github.com/repos/chalucha/cerealed/pulls{/number}","milestones_url":"https://api.github.com/repos/chalucha/cerealed/milestones{/number}","notifications_url":"https://api.github.com/repos/chalucha/cerealed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chalucha/cerealed/labels{/name}","releases_url":"https://api.github.com/repos/chalucha/cerealed/releases{/id}","created_at":"2015-07-28T17:37:19Z","updated_at":"2015-07-28T17:37:19Z","pushed_at":"2015-07-29T16:56:53Z","git_url":"git://github.com/chalucha/cerealed.git","ssh_url":"git@github.com:chalucha/cerealed.git","clone_url":"https://github.com/chalucha/cerealed.git","svn_url":"https://github.com/chalucha/cerealed","homepage":null,"size":551,"stargazers_count":0,"watchers_count":0,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"atilaneves:master","ref":"master","sha":"14c1d8901a92084c9b75b5a8e19adeeff65a0235","user":{"login":"atilaneves","id":4956425,"avatar_url":"https://avatars.githubusercontent.com/u/4956425?v=3","gravatar_id":"","url":"https://api.github.com/users/atilaneves","html_url":"https://github.com/atilaneves","followers_url":"https://api.github.com/users/atilaneves/followers","following_url":"https://api.github.com/users/atilaneves/following{/other_user}","gists_url":"https://api.github.com/users/atilaneves/gists{/gist_id}","starred_url":"https://api.github.com/users/atilaneves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atilaneves/subscriptions","organizations_url":"https://api.github.com/users/atilaneves/orgs","repos_url":"https://api.github.com/users/atilaneves/repos","events_url":"https://api.github.com/users/atilaneves/events{/privacy}","received_events_url":"https://api.github.com/users/atilaneves/received_events","type":"User","site_admin":false},"repo":{"id":11619359,"name":"cerealed","full_name":"atilaneves/cerealed","owner":{"login":"atilaneves","id":4956425,"avatar_url":"https://avatars.githubusercontent.com/u/4956425?v=3","gravatar_id":"","url":"https://api.github.com/users/atilaneves","html_url":"https://github.com/atilaneves","followers_url":"https://api.github.com/users/atilaneves/followers","following_url":"https://api.github.com/users/atilaneves/following{/other_user}","gists_url":"https://api.github.com/users/atilaneves/gists{/gist_id}","starred_url":"https://api.github.com/users/atilaneves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atilaneves/subscriptions","organizations_url":"https://api.github.com/users/atilaneves/orgs","repos_url":"https://api.github.com/users/atilaneves/repos","events_url":"https://api.github.com/users/atilaneves/events{/privacy}","received_events_url":"https://api.github.com/users/atilaneves/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atilaneves/cerealed","description":"Serialisation library for D","fork":false,"url":"https://api.github.com/repos/atilaneves/cerealed","forks_url":"https://api.github.com/repos/atilaneves/cerealed/forks","keys_url":"https://api.github.com/repos/atilaneves/cerealed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atilaneves/cerealed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atilaneves/cerealed/teams","hooks_url":"https://api.github.com/repos/atilaneves/cerealed/hooks","issue_events_url":"https://api.github.com/repos/atilaneves/cerealed/issues/events{/number}","events_url":"https://api.github.com/repos/atilaneves/cerealed/events","assignees_url":"https://api.github.com/repos/atilaneves/cerealed/assignees{/user}","branches_url":"https://api.github.com/repos/atilaneves/cerealed/branches{/branch}","tags_url":"https://api.github.com/repos/atilaneves/cerealed/tags","blobs_url":"https://api.github.com/repos/atilaneves/cerealed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atilaneves/cerealed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atilaneves/cerealed/git/refs{/sha}","trees_url":"https://api.github.com/repos/atilaneves/cerealed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atilaneves/cerealed/statuses/{sha}","languages_url":"https://api.github.com/repos/atilaneves/cerealed/languages","stargazers_url":"https://api.github.com/repos/atilaneves/cerealed/stargazers","contributors_url":"https://api.github.com/repos/atilaneves/cerealed/contributors","subscribers_url":"https://api.github.com/repos/atilaneves/cerealed/subscribers","subscription_url":"https://api.github.com/repos/atilaneves/cerealed/subscription","commits_url":"https://api.github.com/repos/atilaneves/cerealed/commits{/sha}","git_commits_url":"https://api.github.com/repos/atilaneves/cerealed/git/commits{/sha}","comments_url":"https://api.github.com/repos/atilaneves/cerealed/comments{/number}","issue_comment_url":"https://api.github.com/repos/atilaneves/cerealed/issues/comments{/number}","contents_url":"https://api.github.com/repos/atilaneves/cerealed/contents/{+path}","compare_url":"https://api.github.com/repos/atilaneves/cerealed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atilaneves/cerealed/merges","archive_url":"https://api.github.com/repos/atilaneves/cerealed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atilaneves/cerealed/downloads","issues_url":"https://api.github.com/repos/atilaneves/cerealed/issues{/number}","pulls_url":"https://api.github.com/repos/atilaneves/cerealed/pulls{/number}","milestones_url":"https://api.github.com/repos/atilaneves/cerealed/milestones{/number}","notifications_url":"https://api.github.com/repos/atilaneves/cerealed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atilaneves/cerealed/labels{/name}","releases_url":"https://api.github.com/repos/atilaneves/cerealed/releases{/id}","created_at":"2013-07-23T21:13:10Z","updated_at":"2015-06-08T02:13:19Z","pushed_at":"2015-07-30T10:14:02Z","git_url":"git://github.com/atilaneves/cerealed.git","ssh_url":"git@github.com:atilaneves/cerealed.git","clone_url":"https://github.com/atilaneves/cerealed.git","svn_url":"https://github.com/atilaneves/cerealed","homepage":null,"size":551,"stargazers_count":30,"watchers_count":30,"language":"D","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atilaneves/cerealed/pulls/6"},"html":{"href":"https://github.com/atilaneves/cerealed/pull/6"},"issue":{"href":"https://api.github.com/repos/atilaneves/cerealed/issues/6"},"comments":{"href":"https://api.github.com/repos/atilaneves/cerealed/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/atilaneves/cerealed/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/atilaneves/cerealed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atilaneves/cerealed/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/atilaneves/cerealed/statuses/034d6e7652a3ddaf99060f0a266280e3520936c8"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"atilaneves","id":4956425,"avatar_url":"https://avatars.githubusercontent.com/u/4956425?v=3","gravatar_id":"","url":"https://api.github.com/users/atilaneves","html_url":"https://github.com/atilaneves","followers_url":"https://api.github.com/users/atilaneves/followers","following_url":"https://api.github.com/users/atilaneves/following{/other_user}","gists_url":"https://api.github.com/users/atilaneves/gists{/gist_id}","starred_url":"https://api.github.com/users/atilaneves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atilaneves/subscriptions","organizations_url":"https://api.github.com/users/atilaneves/orgs","repos_url":"https://api.github.com/users/atilaneves/repos","events_url":"https://api.github.com/users/atilaneves/events{/privacy}","received_events_url":"https://api.github.com/users/atilaneves/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"commits":2,"additions":37,"deletions":18,"changed_files":4}}