{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/24568","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/24568/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/24568/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/24568/events","html_url":"https://github.com/JuliaLang/julia/issues/24568","id":273084790,"number":24568,"title":"The gfortran benchmarks should use the \"-march=native -ffast-math -funroll-loops\" options","user":{"login":"certik","id":20568,"avatar_url":"https://avatars3.githubusercontent.com/u/20568?v=4","gravatar_id":"","url":"https://api.github.com/users/certik","html_url":"https://github.com/certik","followers_url":"https://api.github.com/users/certik/followers","following_url":"https://api.github.com/users/certik/following{/other_user}","gists_url":"https://api.github.com/users/certik/gists{/gist_id}","starred_url":"https://api.github.com/users/certik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/certik/subscriptions","organizations_url":"https://api.github.com/users/certik/orgs","repos_url":"https://api.github.com/users/certik/repos","events_url":"https://api.github.com/users/certik/events{/privacy}","received_events_url":"https://api.github.com/users/certik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":98,"created_at":"2017-11-10T23:01:48Z","updated_at":"2017-11-16T17:22:56Z","closed_at":"2017-11-14T22:19:53Z","author_association":"CONTRIBUTOR","body":"Specifically, when I compare\r\n```\r\ngfortran -O3 perf.f90 && ./a.out\r\ngfortran -O3 -march=native -ffast-math -funroll-loops perf.f90 && ./a.out\r\n```\r\non my machine, then I get 2x speedup on the `iteration_pi_sum` benchmark. I haven't tested the C code, but a similar speedup might be possible.\r\n\r\nNote: if you use a recent gfortran compiler (e.g. I just tested this with 7.2.0), you can just use:\r\n```\r\ngfortran -Ofast perf.f90\r\n```\r\nAnd it will turn on the proper options for you, and produce optimal results."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/344995680","html_url":"https://github.com/JuliaLang/julia/issues/24568#issuecomment-344995680","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/24568","id":344995680,"user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars3.githubusercontent.com/u/712232?v=4","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"created_at":"2017-11-16T17:22:56Z","updated_at":"2017-11-16T17:22:56Z","author_association":"MEMBER","body":"> So I took the time, and shown on an actual code that in practice, all these claims are inconsistent with the particular example of exp2.\r\n\r\nThose claims are not accurate and the accurate version are not being proofed wrong by what you did to `exp2`\r\n\r\n> `-ffast-math` reduces accuracy arbitrarily (no bound)\r\n\r\nThis is still correct. What you've shown is that you can write code in fast-math mode on some implementations that give you the result you want. That says abosolutely nothing about what fast-math can do in general. I'll repeat that you have to do that starting by giving a precise enough definition of fast-math. Just testing precision for a particular function will **never** be accepted as a proof.\r\n\r\n> libraries like openlibm cannot be safely compiled with icc (with default options)\r\n\r\n\"safely\" is a vague term. If you use it to mean that you can use a particular version of icc to compile it and give reasonable result, I have no doubt about it. But safely should mean reliable in this context and it means that you have to show that no past or future version of the compiler can ever produce wrong results. Again, testing one implementation is not enough, no matter how many input values you use.\r\n\r\n> if you put these (i.e., IEEE specific) operations behind function calls, then they will become much slower => it will be slower than the original\r\n\r\nI notice you use lto there so that's not related anymore.\r\n\r\n> IEEE does not incur a performance hit for checking inf/nan\r\n\r\nI don't see why it's related at all for what you've shown."}}
{"actor":{"display_login":"yuyichao"}}