{"action":"opened","issue":{"url":"https://api.github.com/repos/polyml/polyml/issues/84","repository_url":"https://api.github.com/repos/polyml/polyml","labels_url":"https://api.github.com/repos/polyml/polyml/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/polyml/polyml/issues/84/comments","events_url":"https://api.github.com/repos/polyml/polyml/issues/84/events","html_url":"https://github.com/polyml/polyml/issues/84","id":256509915,"number":84,"title":"Support additional integer intrinsics","user":{"login":"jack-pappas","id":477287,"avatar_url":"https://avatars1.githubusercontent.com/u/477287?v=4","gravatar_id":"","url":"https://api.github.com/users/jack-pappas","html_url":"https://github.com/jack-pappas","followers_url":"https://api.github.com/users/jack-pappas/followers","following_url":"https://api.github.com/users/jack-pappas/following{/other_user}","gists_url":"https://api.github.com/users/jack-pappas/gists{/gist_id}","starred_url":"https://api.github.com/users/jack-pappas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack-pappas/subscriptions","organizations_url":"https://api.github.com/users/jack-pappas/orgs","repos_url":"https://api.github.com/users/jack-pappas/repos","events_url":"https://api.github.com/users/jack-pappas/events{/privacy}","received_events_url":"https://api.github.com/users/jack-pappas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-10T13:23:15Z","updated_at":"2017-09-10T13:23:15Z","closed_at":null,"author_association":"NONE","body":"They're not part of the Basis Library, but it'd be useful if PolyML supported additional intrinsics for 32- and 64-bit integers, such as:\r\n* [Hamming weight (aka \"population count\")](https://en.wikipedia.org/wiki/Hamming_weight)\r\n* [Count leading zeros](https://en.wikipedia.org/wiki/Find_first_set)\r\n* [Count trailing zeros](https://en.wikipedia.org/wiki/Find_first_set)\r\n\r\nThese functions are trivially implemented in software, but are also implemented in hardware by optimized instructions on most common platforms today. If PolyML supported these, it'd be more feasible to implement certain persistent data structures which rely heavily on these operations. For example, HAMT and [CHAMP](https://pdfs.semanticscholar.org/7fc2/d22ad447fc1bdfb487b30f99e0a9b3cbd40f.pdf) utilize ``popcnt`` extensively, so having to implement ``popcnt`` in software greatly reduces the performance of the data structures."}}
{"actor":{"display_login":"jack-pappas"}}