{"action":"created","issue":{"url":"https://api.github.com/repos/shibatch/sleef/issues/107","repository_url":"https://api.github.com/repos/shibatch/sleef","labels_url":"https://api.github.com/repos/shibatch/sleef/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/shibatch/sleef/issues/107/comments","events_url":"https://api.github.com/repos/shibatch/sleef/issues/107/events","html_url":"https://github.com/shibatch/sleef/issues/107","id":276735620,"number":107,"title":"Large performance diff between sin u10 and u35","user":{"login":"xoofx","id":715038,"avatar_url":"https://avatars2.githubusercontent.com/u/715038?v=4","gravatar_id":"","url":"https://api.github.com/users/xoofx","html_url":"https://github.com/xoofx","followers_url":"https://api.github.com/users/xoofx/followers","following_url":"https://api.github.com/users/xoofx/following{/other_user}","gists_url":"https://api.github.com/users/xoofx/gists{/gist_id}","starred_url":"https://api.github.com/users/xoofx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xoofx/subscriptions","organizations_url":"https://api.github.com/users/xoofx/orgs","repos_url":"https://api.github.com/users/xoofx/repos","events_url":"https://api.github.com/users/xoofx/events{/privacy}","received_events_url":"https://api.github.com/users/xoofx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-25T08:32:47Z","updated_at":"2017-11-25T08:41:59Z","closed_at":null,"author_association":"COLLABORATOR","body":"Hey, I just had a quick look a bit more at the performance of sleef and tried just a simple benchmark with `Sleef_sinf_u10` and `Sleef_sinf_u35`, compare also against a stock sin with MSVC compiler:\r\n\r\nThe bench is something in the line of:\r\n```c++\r\nfloat BenchFloat_Sin(unsigned long count)\r\n{\r\n    float value = 0;\r\n    float f = 5;\r\n    for (unsigned long i = 0; i < count; i++)\r\n    {\r\n        value += sin(f);\r\n        value += sin(f + 1);\r\n        value += sin(f + 2);\r\n        value += sin(f + 3);\r\n        value += sin(f + 4);\r\n        f += i;\r\n    }\r\n    return value;\r\n}\r\n```\r\nwhere the count was dynamically calibrated from another bench, but in that case on my machine was set to 6574622.\r\n\r\nThe timing results are:\r\n\r\n```\r\nMSVC sinf: 418ms\r\nSleef_sinf_u10: 2058ms\r\nSleef_sinf_u35: 179ms\r\n```\r\nbetween u10 and u35, there is more than x10 different (!)... I haven't checked the accuracy of MSVC sinf, so likely it is not 1 ULP. Looks like exponential to get 1ULP.\r\n\r\nDo you think this results are expected? \r\n\r\nAlso, If it is not possible to achieve 1ULP without this cost, would it be possible to introduce an intermediate precision (ULP 2?) that could lower the gap there and make it more viable?\r\n\r\nMore generally, I was also wondering if adding also more ULP precisions choices (u10, u20, u35, u60) could be helpful in some cases..."},"comment":{"url":"https://api.github.com/repos/shibatch/sleef/issues/comments/346927220","html_url":"https://github.com/shibatch/sleef/issues/107#issuecomment-346927220","issue_url":"https://api.github.com/repos/shibatch/sleef/issues/107","id":346927220,"user":{"login":"shibatch","id":15994775,"avatar_url":"https://avatars0.githubusercontent.com/u/15994775?v=4","gravatar_id":"","url":"https://api.github.com/users/shibatch","html_url":"https://github.com/shibatch","followers_url":"https://api.github.com/users/shibatch/followers","following_url":"https://api.github.com/users/shibatch/following{/other_user}","gists_url":"https://api.github.com/users/shibatch/gists{/gist_id}","starred_url":"https://api.github.com/users/shibatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shibatch/subscriptions","organizations_url":"https://api.github.com/users/shibatch/orgs","repos_url":"https://api.github.com/users/shibatch/repos","events_url":"https://api.github.com/users/shibatch/events{/privacy}","received_events_url":"https://api.github.com/users/shibatch/received_events","type":"User","site_admin":false},"created_at":"2017-11-25T08:41:59Z","updated_at":"2017-11-25T08:41:59Z","author_association":"OWNER","body":"The scalar functions are not seriously optimized.\r\nThey are provided for easier understanding of the algorithms.\r\n\r\nAs you know, I am planning to make the scalar functions use AVX2 or the best extension available on the computer, and that should resolve this problem.\r\nAfter this feature will be implemented, the computation speed of the scalar function will be almost same as the 128-bit SIMD version.\r\n"}}
{"actor":{"display_login":"shibatch"}}