{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/4557","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4557/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4557/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4557/events","html_url":"https://github.com/crystal-lang/crystal/issues/4557","id":235474614,"number":4557,"title":"Reimplementation a Hash using open addressing","user":{"login":"akzhan","id":112516,"avatar_url":"https://avatars2.githubusercontent.com/u/112516?v=3","gravatar_id":"","url":"https://api.github.com/users/akzhan","html_url":"https://github.com/akzhan","followers_url":"https://api.github.com/users/akzhan/followers","following_url":"https://api.github.com/users/akzhan/following{/other_user}","gists_url":"https://api.github.com/users/akzhan/gists{/gist_id}","starred_url":"https://api.github.com/users/akzhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akzhan/subscriptions","organizations_url":"https://api.github.com/users/akzhan/orgs","repos_url":"https://api.github.com/users/akzhan/repos","events_url":"https://api.github.com/users/akzhan/events{/privacy}","received_events_url":"https://api.github.com/users/akzhan/received_events","type":"User","site_admin":false},"labels":[{"id":530992188,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/community:to-implement","name":"community:to-implement","color":"e99695","default":false},{"id":20487869,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/kind:feature","name":"kind:feature","color":"84b6eb","default":false},{"id":253750561,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/topic:performance","name":"topic:performance","color":"811d21","default":false},{"id":253019694,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/topic:stdlib","name":"topic:stdlib","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":43,"created_at":"2017-06-13T08:28:02Z","updated_at":"2017-06-16T14:14:20Z","closed_at":null,"body":"Crystal Hash(K, V) should be reimplemented using open addressing and powers of two.\r\n\r\nTo be read: \r\n\r\n* http://www.idryman.org/blog/2017/05/03/writing-a-damn-fast-hash-table-with-tiny-memory-footprints/.\r\n* https://github.com/konovod/testhash\r\n* https://github.com/yxhuvud/crystal-hash\r\n* https://developers.redhat.com/blog/2017/02/27/towards-faster-ruby-hash-tables/\r\n* (sometimes 508) http://blog.redpanthers.co/behind-scenes-hash-table-performance-ruby-2-4\r\n\r\nThanks to @RX14, @konovod, @yxhuvud for links.\r\n\r\nRefs #2817, #3932 and https://github.com/crystal-lang/crystal/pull/4033#issuecomment-307779149 to continue discussion and implementation."},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/309037096","html_url":"https://github.com/crystal-lang/crystal/issues/4557#issuecomment-309037096","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4557","id":309037096,"user":{"login":"yxhuvud","id":155895,"avatar_url":"https://avatars2.githubusercontent.com/u/155895?v=3","gravatar_id":"","url":"https://api.github.com/users/yxhuvud","html_url":"https://github.com/yxhuvud","followers_url":"https://api.github.com/users/yxhuvud/followers","following_url":"https://api.github.com/users/yxhuvud/following{/other_user}","gists_url":"https://api.github.com/users/yxhuvud/gists{/gist_id}","starred_url":"https://api.github.com/users/yxhuvud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yxhuvud/subscriptions","organizations_url":"https://api.github.com/users/yxhuvud/orgs","repos_url":"https://api.github.com/users/yxhuvud/repos","events_url":"https://api.github.com/users/yxhuvud/events{/privacy}","received_events_url":"https://api.github.com/users/yxhuvud/received_events","type":"User","site_admin":false},"created_at":"2017-06-16T14:14:20Z","updated_at":"2017-06-16T14:14:20Z","body":"\"I've also found someone else attempt to implement better hash - https://github.com/yxhuvud/crystal-hash, it is also showing worse results than default implementation. \"\r\n\r\n@konovod well, it seems to be worse for small hashes. It is multiple times faster for big hashes. Also it should be noticed that I haven't really done proper measurement of how fast or slow it is, so any claims of speed or slowness may be wrong. I also haven't benchmarked at all, so it may very well contain stupid mistakes.\r\n\r\n@funny-falcon Note that it is almost a line for line translation of the ruby implementation (except for the index compaction), with some ideomatic changes to allow for usage of structs and objects (hopefully where appropriate). But as I havn't benchmarked, some of that may be quite misguided. \r\n\r\nAnother note is that it changes the hash contract slightly compared to the current crystal implementation. It does an additional check that the hashes are the same before comparing equality when doing lookup. That is probably a good thing, but it should be noted."}}
{"actor":{"display_login":"yxhuvud"}}