{"action":"created","comment":{"url":"https://api.github.com/repos/skroutz/string_metric/pulls/comments/28206249","id":28206249,"diff_hunk":"@@ -0,0 +1,99 @@\n+#include <ruby.h>\n+\n+#define MIN(a, b, c) ((a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c)))","path":"ext/string_metric/levenshtein/iterative_with_two_matrix_rows_ext.c","position":3,"original_position":3,"commit_id":"2fb2edf0a79b69b5c1b7875b083892568c507ea6","original_commit_id":"2fb2edf0a79b69b5c1b7875b083892568c507ea6","user":{"login":"freestyl3r","id":2126390,"avatar_url":"https://avatars.githubusercontent.com/u/2126390?v=3","gravatar_id":"","url":"https://api.github.com/users/freestyl3r","html_url":"https://github.com/freestyl3r","followers_url":"https://api.github.com/users/freestyl3r/followers","following_url":"https://api.github.com/users/freestyl3r/following{/other_user}","gists_url":"https://api.github.com/users/freestyl3r/gists{/gist_id}","starred_url":"https://api.github.com/users/freestyl3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freestyl3r/subscriptions","organizations_url":"https://api.github.com/users/freestyl3r/orgs","repos_url":"https://api.github.com/users/freestyl3r/repos","events_url":"https://api.github.com/users/freestyl3r/events{/privacy}","received_events_url":"https://api.github.com/users/freestyl3r/received_events","type":"User","site_admin":false},"body":"The above line could be made much easier to reason with, using nested macros:\r\n    #define MIN2(a, b) (((a) < (b)) ? (a) : (b))\r\n    #define MIN3(a, b, c) (MIN2(MIN2((a), (b)), (c)))","created_at":"2015-04-12T19:03:27Z","updated_at":"2015-04-12T19:03:27Z","html_url":"https://github.com/skroutz/string_metric/pull/17#discussion_r28206249","pull_request_url":"https://api.github.com/repos/skroutz/string_metric/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/skroutz/string_metric/pulls/comments/28206249"},"html":{"href":"https://github.com/skroutz/string_metric/pull/17#discussion_r28206249"},"pull_request":{"href":"https://api.github.com/repos/skroutz/string_metric/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/skroutz/string_metric/pulls/17","id":12392600,"html_url":"https://github.com/skroutz/string_metric/pull/17","diff_url":"https://github.com/skroutz/string_metric/pull/17.diff","patch_url":"https://github.com/skroutz/string_metric/pull/17.patch","issue_url":"https://api.github.com/repos/skroutz/string_metric/issues/17","number":17,"state":"open","locked":false,"title":"Two matrix rows strategy: native extension implementation for MRI ","user":{"login":"charkost","id":895410,"avatar_url":"https://avatars.githubusercontent.com/u/895410?v=3","gravatar_id":"","url":"https://api.github.com/users/charkost","html_url":"https://github.com/charkost","followers_url":"https://api.github.com/users/charkost/followers","following_url":"https://api.github.com/users/charkost/following{/other_user}","gists_url":"https://api.github.com/users/charkost/gists{/gist_id}","starred_url":"https://api.github.com/users/charkost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charkost/subscriptions","organizations_url":"https://api.github.com/users/charkost/orgs","repos_url":"https://api.github.com/users/charkost/repos","events_url":"https://api.github.com/users/charkost/events{/privacy}","received_events_url":"https://api.github.com/users/charkost/received_events","type":"User","site_admin":false},"body":"Hello @chief!\r\nI bet that you got bored reviewing optimization pull requests all the time. :)\r\n\r\nHere is what we can achive with native extensions for Levenshtein#distance.\r\n(Benchmarks updated in README)\r\n\r\nI am not sure if you want this implementation inside this gem because it introduces some code complexity so feel free to reject it.\r\n\r\nIn our meeting you mentioned that you have some future ideas for this gem. Maybe we can discuss them here or inside a new github issue. What is your opinion?\r\n\r\n","created_at":"2014-02-10T21:58:50Z","updated_at":"2015-04-12T19:03:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7aac7c0cc582f5f994b3634786876ed90053b11f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/skroutz/string_metric/pulls/17/commits","review_comments_url":"https://api.github.com/repos/skroutz/string_metric/pulls/17/comments","review_comment_url":"https://api.github.com/repos/skroutz/string_metric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/skroutz/string_metric/issues/17/comments","statuses_url":"https://api.github.com/repos/skroutz/string_metric/statuses/2fb2edf0a79b69b5c1b7875b083892568c507ea6","head":{"label":"charkost:native_extension","ref":"native_extension","sha":"2fb2edf0a79b69b5c1b7875b083892568c507ea6","user":{"login":"charkost","id":895410,"avatar_url":"https://avatars.githubusercontent.com/u/895410?v=3","gravatar_id":"","url":"https://api.github.com/users/charkost","html_url":"https://github.com/charkost","followers_url":"https://api.github.com/users/charkost/followers","following_url":"https://api.github.com/users/charkost/following{/other_user}","gists_url":"https://api.github.com/users/charkost/gists{/gist_id}","starred_url":"https://api.github.com/users/charkost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charkost/subscriptions","organizations_url":"https://api.github.com/users/charkost/orgs","repos_url":"https://api.github.com/users/charkost/repos","events_url":"https://api.github.com/users/charkost/events{/privacy}","received_events_url":"https://api.github.com/users/charkost/received_events","type":"User","site_admin":false},"repo":{"id":16322784,"name":"string_metric","full_name":"charkost/string_metric","owner":{"login":"charkost","id":895410,"avatar_url":"https://avatars.githubusercontent.com/u/895410?v=3","gravatar_id":"","url":"https://api.github.com/users/charkost","html_url":"https://github.com/charkost","followers_url":"https://api.github.com/users/charkost/followers","following_url":"https://api.github.com/users/charkost/following{/other_user}","gists_url":"https://api.github.com/users/charkost/gists{/gist_id}","starred_url":"https://api.github.com/users/charkost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charkost/subscriptions","organizations_url":"https://api.github.com/users/charkost/orgs","repos_url":"https://api.github.com/users/charkost/repos","events_url":"https://api.github.com/users/charkost/events{/privacy}","received_events_url":"https://api.github.com/users/charkost/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/charkost/string_metric","description":"A simple library with String Metric algorithms","fork":true,"url":"https://api.github.com/repos/charkost/string_metric","forks_url":"https://api.github.com/repos/charkost/string_metric/forks","keys_url":"https://api.github.com/repos/charkost/string_metric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/charkost/string_metric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/charkost/string_metric/teams","hooks_url":"https://api.github.com/repos/charkost/string_metric/hooks","issue_events_url":"https://api.github.com/repos/charkost/string_metric/issues/events{/number}","events_url":"https://api.github.com/repos/charkost/string_metric/events","assignees_url":"https://api.github.com/repos/charkost/string_metric/assignees{/user}","branches_url":"https://api.github.com/repos/charkost/string_metric/branches{/branch}","tags_url":"https://api.github.com/repos/charkost/string_metric/tags","blobs_url":"https://api.github.com/repos/charkost/string_metric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/charkost/string_metric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/charkost/string_metric/git/refs{/sha}","trees_url":"https://api.github.com/repos/charkost/string_metric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/charkost/string_metric/statuses/{sha}","languages_url":"https://api.github.com/repos/charkost/string_metric/languages","stargazers_url":"https://api.github.com/repos/charkost/string_metric/stargazers","contributors_url":"https://api.github.com/repos/charkost/string_metric/contributors","subscribers_url":"https://api.github.com/repos/charkost/string_metric/subscribers","subscription_url":"https://api.github.com/repos/charkost/string_metric/subscription","commits_url":"https://api.github.com/repos/charkost/string_metric/commits{/sha}","git_commits_url":"https://api.github.com/repos/charkost/string_metric/git/commits{/sha}","comments_url":"https://api.github.com/repos/charkost/string_metric/comments{/number}","issue_comment_url":"https://api.github.com/repos/charkost/string_metric/issues/comments{/number}","contents_url":"https://api.github.com/repos/charkost/string_metric/contents/{+path}","compare_url":"https://api.github.com/repos/charkost/string_metric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/charkost/string_metric/merges","archive_url":"https://api.github.com/repos/charkost/string_metric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/charkost/string_metric/downloads","issues_url":"https://api.github.com/repos/charkost/string_metric/issues{/number}","pulls_url":"https://api.github.com/repos/charkost/string_metric/pulls{/number}","milestones_url":"https://api.github.com/repos/charkost/string_metric/milestones{/number}","notifications_url":"https://api.github.com/repos/charkost/string_metric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/charkost/string_metric/labels{/name}","releases_url":"https://api.github.com/repos/charkost/string_metric/releases{/id}","created_at":"2014-01-28T19:21:16Z","updated_at":"2014-10-17T08:13:49Z","pushed_at":"2014-02-11T16:15:17Z","git_url":"git://github.com/charkost/string_metric.git","ssh_url":"git@github.com:charkost/string_metric.git","clone_url":"https://github.com/charkost/string_metric.git","svn_url":"https://github.com/charkost/string_metric","homepage":null,"size":360,"stargazers_count":1,"watchers_count":1,"language":"Ruby","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":1,"default_branch":"master"}},"base":{"label":"skroutz:master","ref":"master","sha":"efc19bfe5bcbd74873edb334dcdd6199a7dfe499","user":{"login":"skroutz","id":285550,"avatar_url":"https://avatars.githubusercontent.com/u/285550?v=3","gravatar_id":"","url":"https://api.github.com/users/skroutz","html_url":"https://github.com/skroutz","followers_url":"https://api.github.com/users/skroutz/followers","following_url":"https://api.github.com/users/skroutz/following{/other_user}","gists_url":"https://api.github.com/users/skroutz/gists{/gist_id}","starred_url":"https://api.github.com/users/skroutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skroutz/subscriptions","organizations_url":"https://api.github.com/users/skroutz/orgs","repos_url":"https://api.github.com/users/skroutz/repos","events_url":"https://api.github.com/users/skroutz/events{/privacy}","received_events_url":"https://api.github.com/users/skroutz/received_events","type":"Organization","site_admin":false},"repo":{"id":15982014,"name":"string_metric","full_name":"skroutz/string_metric","owner":{"login":"skroutz","id":285550,"avatar_url":"https://avatars.githubusercontent.com/u/285550?v=3","gravatar_id":"","url":"https://api.github.com/users/skroutz","html_url":"https://github.com/skroutz","followers_url":"https://api.github.com/users/skroutz/followers","following_url":"https://api.github.com/users/skroutz/following{/other_user}","gists_url":"https://api.github.com/users/skroutz/gists{/gist_id}","starred_url":"https://api.github.com/users/skroutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skroutz/subscriptions","organizations_url":"https://api.github.com/users/skroutz/orgs","repos_url":"https://api.github.com/users/skroutz/repos","events_url":"https://api.github.com/users/skroutz/events{/privacy}","received_events_url":"https://api.github.com/users/skroutz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/skroutz/string_metric","description":"A simple library with String Metric algorithms","fork":false,"url":"https://api.github.com/repos/skroutz/string_metric","forks_url":"https://api.github.com/repos/skroutz/string_metric/forks","keys_url":"https://api.github.com/repos/skroutz/string_metric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skroutz/string_metric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skroutz/string_metric/teams","hooks_url":"https://api.github.com/repos/skroutz/string_metric/hooks","issue_events_url":"https://api.github.com/repos/skroutz/string_metric/issues/events{/number}","events_url":"https://api.github.com/repos/skroutz/string_metric/events","assignees_url":"https://api.github.com/repos/skroutz/string_metric/assignees{/user}","branches_url":"https://api.github.com/repos/skroutz/string_metric/branches{/branch}","tags_url":"https://api.github.com/repos/skroutz/string_metric/tags","blobs_url":"https://api.github.com/repos/skroutz/string_metric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skroutz/string_metric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skroutz/string_metric/git/refs{/sha}","trees_url":"https://api.github.com/repos/skroutz/string_metric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skroutz/string_metric/statuses/{sha}","languages_url":"https://api.github.com/repos/skroutz/string_metric/languages","stargazers_url":"https://api.github.com/repos/skroutz/string_metric/stargazers","contributors_url":"https://api.github.com/repos/skroutz/string_metric/contributors","subscribers_url":"https://api.github.com/repos/skroutz/string_metric/subscribers","subscription_url":"https://api.github.com/repos/skroutz/string_metric/subscription","commits_url":"https://api.github.com/repos/skroutz/string_metric/commits{/sha}","git_commits_url":"https://api.github.com/repos/skroutz/string_metric/git/commits{/sha}","comments_url":"https://api.github.com/repos/skroutz/string_metric/comments{/number}","issue_comment_url":"https://api.github.com/repos/skroutz/string_metric/issues/comments{/number}","contents_url":"https://api.github.com/repos/skroutz/string_metric/contents/{+path}","compare_url":"https://api.github.com/repos/skroutz/string_metric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skroutz/string_metric/merges","archive_url":"https://api.github.com/repos/skroutz/string_metric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skroutz/string_metric/downloads","issues_url":"https://api.github.com/repos/skroutz/string_metric/issues{/number}","pulls_url":"https://api.github.com/repos/skroutz/string_metric/pulls{/number}","milestones_url":"https://api.github.com/repos/skroutz/string_metric/milestones{/number}","notifications_url":"https://api.github.com/repos/skroutz/string_metric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skroutz/string_metric/labels{/name}","releases_url":"https://api.github.com/repos/skroutz/string_metric/releases{/id}","created_at":"2014-01-16T21:49:04Z","updated_at":"2014-02-03T08:45:13Z","pushed_at":"2015-04-12T19:00:37Z","git_url":"git://github.com/skroutz/string_metric.git","ssh_url":"git@github.com:skroutz/string_metric.git","clone_url":"https://github.com/skroutz/string_metric.git","svn_url":"https://github.com/skroutz/string_metric","homepage":null,"size":742,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/skroutz/string_metric/pulls/17"},"html":{"href":"https://github.com/skroutz/string_metric/pull/17"},"issue":{"href":"https://api.github.com/repos/skroutz/string_metric/issues/17"},"comments":{"href":"https://api.github.com/repos/skroutz/string_metric/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/skroutz/string_metric/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/skroutz/string_metric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/skroutz/string_metric/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/skroutz/string_metric/statuses/2fb2edf0a79b69b5c1b7875b083892568c507ea6"}}}}