{"action":"created","issue":{"url":"https://api.github.com/repos/yandex/ClickHouse/issues/3918","repository_url":"https://api.github.com/repos/yandex/ClickHouse","labels_url":"https://api.github.com/repos/yandex/ClickHouse/issues/3918/labels{/name}","comments_url":"https://api.github.com/repos/yandex/ClickHouse/issues/3918/comments","events_url":"https://api.github.com/repos/yandex/ClickHouse/issues/3918/events","html_url":"https://github.com/yandex/ClickHouse/pull/3918","id":393869283,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNzY1NTU3","number":3918,"title":"Performance tests for hash functions","user":{"login":"filimonov","id":1549571,"node_id":"MDQ6VXNlcjE1NDk1NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1549571?v=4","gravatar_id":"","url":"https://api.github.com/users/filimonov","html_url":"https://github.com/filimonov","followers_url":"https://api.github.com/users/filimonov/followers","following_url":"https://api.github.com/users/filimonov/following{/other_user}","gists_url":"https://api.github.com/users/filimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/filimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filimonov/subscriptions","organizations_url":"https://api.github.com/users/filimonov/orgs","repos_url":"https://api.github.com/users/filimonov/repos","events_url":"https://api.github.com/users/filimonov/events{/privacy}","received_events_url":"https://api.github.com/users/filimonov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-24T12:02:31Z","updated_at":"2018-12-31T09:20:41Z","closed_at":"2018-12-25T17:55:56Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/yandex/ClickHouse/pulls/3918","html_url":"https://github.com/yandex/ClickHouse/pull/3918","diff_url":"https://github.com/yandex/ClickHouse/pull/3918.diff","patch_url":"https://github.com/yandex/ClickHouse/pull/3918.patch"},"body":"I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en\r\n\r\nFor changelog. Remove if this is non-significant change.\r\n\r\n### Category (leave one):\r\n- Build/Testing/Packaging Improvement\r\n\r\n### Short description (up to few sentences):\r\nPerformance tests for hash functions (  #3905 ).\r\n\r\n### Detailed description (optional):\r\n\r\nSummary in a table form (tested on i5-2400 CPU @ 3.10GHz workstation with 8Gb Ram)\r\n\r\njavaHash & hiveHash have very poor quality (lot of collisions even in small dataset).\r\n\r\n| hash            | year of publish | empty1  | empty4 | 10char1 | 10char4 | 1024char1 | 1024char4 |\r\n| --------------- | ---- | ------- | ------- | ----- | ----- | ---- | ---- |\r\n| cityHash64      | 2011 | 801.9   | 2,219.4 | 328.7 | 968.8 | 16.1 | 37.1 |\r\n| farmHash64      | 2014 | 814.3   | 1,928.3 | 318.1 | 923.1 | 19.1 | 39.0 |\r\n| metroHash64     | 2015 | 658.6   | 1,883.4 | 293.7 | 939.0 | 18.3 | 38.9 |\r\n| murmurHash2_32  | 2008 | 920.2   | 2,438.1 | 297.5 | 877.4 | 15.5 | 33.9 |\r\n| murmurHash2_64  | 2008 | 798.5   | 1,707.0 | 293.9 | 955.5 | 15.9 | 38.2 |\r\n| murmurHash3_32  | 2012 | 739.0   | 2,033.2 | 252.9 | 784.6 | 13.7 | 32.8 |\r\n| murmurHash3_64  | 2012 | 448.2   | 1,612.5 | 230.6 | 716.5 | 16.3 | 37.2 |\r\n| murmurHash3_128 | 2012 | 537.3   | 1,316.9 | 237.0 | 747.5 | 16.1 | 37.4 |\r\n| javaHash        | ?    | 1,326.7 | 2,174.9 | 274.2 | 844.9 | 5.2  | 20.6 |\r\n| hiveHash        | ?    | 1,305.0 | 2,790.2 | 276.2 | 860.1 | 5.2  | 20.8 |\r\n| xxHash32        | 2012 | 807.2   | 1,800.8 | 273.9 | 865.5 | 16.2 | 33.8 |\r\n| xxHash64        | 2012 | 711.5   | 1,998.0 | 263.8 | 859.8 | 18.7 | 39.9 |\r\n\r\n#### Legend:\r\n\r\nnumber is Mbytes per sec (higher is better)\r\n`empty1`  - empty string on in one thread (hash init / finalize costs)\r\n`empty4`  - empty string on in 4 threads (hash init / finalize costs)\r\n`10char1` -  10 char string (numeric) on in one thread\r\n`10empty4`  - 10 char string (numeric) on in 4 threads\r\n`1024char1`-  1024 char string (\"Lorem ipsum...\") on in one thread\r\n`1024char4`  - 1024 char string (\"Lorem ipsum...\") on in 4 threads\r\n"},"comment":{"url":"https://api.github.com/repos/yandex/ClickHouse/issues/comments/450623919","html_url":"https://github.com/yandex/ClickHouse/pull/3918#issuecomment-450623919","issue_url":"https://api.github.com/repos/yandex/ClickHouse/issues/3918","id":450623919,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDYyMzkxOQ==","user":{"login":"filimonov","id":1549571,"node_id":"MDQ6VXNlcjE1NDk1NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1549571?v=4","gravatar_id":"","url":"https://api.github.com/users/filimonov","html_url":"https://github.com/filimonov","followers_url":"https://api.github.com/users/filimonov/followers","following_url":"https://api.github.com/users/filimonov/following{/other_user}","gists_url":"https://api.github.com/users/filimonov/gists{/gist_id}","starred_url":"https://api.github.com/users/filimonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filimonov/subscriptions","organizations_url":"https://api.github.com/users/filimonov/orgs","repos_url":"https://api.github.com/users/filimonov/repos","events_url":"https://api.github.com/users/filimonov/events{/privacy}","received_events_url":"https://api.github.com/users/filimonov/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T09:20:41Z","updated_at":"2018-12-31T09:20:41Z","author_association":"CONTRIBUTOR","body":"> Numbers in MB/sec looks like MB of source data per second, where source data is something like system.numbers table. It means, that this is not MB/sec, but MHashes/sec divided by 8.\r\n\r\nYep. Looks like that is the reason of those weird results.\r\n\r\n> Testing with set of strings with constant length is non-representative, because it makes branch predictor too happy. Better to test on real dataset with different distribution of length of strings.\r\n\r\nYes, it gives a very rough estimation of the speed. But to make it possible to create reproducible performance tests some 'predefined' dataset should be published. \r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"filimonov"}}