{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/4625","repository_url":"https://api.github.com/repos/kripken/emscripten","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/4625/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/4625/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/4625/events","html_url":"https://github.com/kripken/emscripten/issues/4625","id":182945035,"number":4625,"title":"BINARYEN_IMPRECISE, on or off by default?","user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-14T01:46:14Z","updated_at":"2016-10-14T19:23:21Z","closed_at":null,"body":"wasm will trap on e.g. 1/0 in integers, but asm.js didn't. Binaryen's asm2wasm can compile code in two modes, \"precise\" which should behave exactly like before (and exactly like a native build), by avoiding traps carefully, and an \"imprecise\" mode which ignores that things might trap, which is faster (but might trap).\r\n\r\n * Precise by default (current setting) means people aren't surprised by correctness bugs, but are surprised by perf issues.\r\n * Imprecise by default would mean people are surprised by correctness bugs, but are not surprised by perf issues.\r\n * A third option might be to try to get the precise mode up to the same speed as imprecise.\r\n\r\nNo obvious answer what is better here. Thoughts?"},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/253897460","html_url":"https://github.com/kripken/emscripten/issues/4625#issuecomment-253897460","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/4625","id":253897460,"user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T19:23:21Z","updated_at":"2016-10-14T19:23:21Z","body":"Yeah, the term isn't the best I guess. The idea behind it was \"precise = behave precisely the same as we always have and the way most native builds do\".\r\n\r\nThings affected:\r\n * i32, i64 div and rem, signed and unsigned\r\n * float-to-int truncation\r\n\r\nThis does affect real-world code, e.g. some things in the emscripten test suite, as well as the csmith fuzzer generates code that hits these.\r\n\r\nWe currently avoid traps by calling out into another function. I think right now that does an ffi into JS, which is easiest - we are guaranteed to get the same semantics as JS. Instead we could check for 0 or the float-to-int trunc limits and carefully do what JS would do, in wasm, which would be faster. Note that we don't and probably shouldn't do this inline because of code size concerns."}}
{"actor":{"display_login":"kripken"}}