{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/design/issues/148","labels_url":"https://api.github.com/repos/WebAssembly/design/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/design/issues/148/comments","events_url":"https://api.github.com/repos/WebAssembly/design/issues/148/events","html_url":"https://github.com/WebAssembly/design/issues/148","id":87387260,"number":148,"title":"What about subnormals?","user":{"login":"jfbastien","id":298127,"avatar_url":"https://avatars.githubusercontent.com/u/298127?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbastien","html_url":"https://github.com/jfbastien","followers_url":"https://api.github.com/users/jfbastien/followers","following_url":"https://api.github.com/users/jfbastien/following{/other_user}","gists_url":"https://api.github.com/users/jfbastien/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbastien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbastien/subscriptions","organizations_url":"https://api.github.com/users/jfbastien/orgs","repos_url":"https://api.github.com/users/jfbastien/repos","events_url":"https://api.github.com/users/jfbastien/events{/privacy}","received_events_url":"https://api.github.com/users/jfbastien/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WebAssembly/design/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/WebAssembly/design/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/WebAssembly/design/milestones/2","html_url":"https://github.com/WebAssembly/design/milestones/MVP","labels_url":"https://api.github.com/repos/WebAssembly/design/milestones/2/labels","id":1138963,"number":2,"title":"MVP","description":"","creator":{"login":"sunfishcode","id":4503403,"avatar_url":"https://avatars.githubusercontent.com/u/4503403?v=3","gravatar_id":"","url":"https://api.github.com/users/sunfishcode","html_url":"https://github.com/sunfishcode","followers_url":"https://api.github.com/users/sunfishcode/followers","following_url":"https://api.github.com/users/sunfishcode/following{/other_user}","gists_url":"https://api.github.com/users/sunfishcode/gists{/gist_id}","starred_url":"https://api.github.com/users/sunfishcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunfishcode/subscriptions","organizations_url":"https://api.github.com/users/sunfishcode/orgs","repos_url":"https://api.github.com/users/sunfishcode/repos","events_url":"https://api.github.com/users/sunfishcode/events{/privacy}","received_events_url":"https://api.github.com/users/sunfishcode/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":3,"state":"open","created_at":"2015-05-29T00:13:49Z","updated_at":"2015-06-30T17:33:49Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-06-11T15:36:45Z","updated_at":"2015-07-02T15:17:14Z","closed_at":null,"body":"Forking from: https://github.com/WebAssembly/design/pull/141#discussion_r32198186\r\n\r\nShould denormal be:\r\n* Unspecified (say so in Nondeterminism.md).\r\n* Fully specified as IEEE-754 compliance.\r\n* Fully specified as IEEE-754 compliance for scalars, and do something for SIMD because existing hardware (especially ARMv7 NEON) doesn't support denormals.\r\n* Specified as DAZ/FTZ (not IEEE-754 compliant).\r\n\r\nWe should probably let ourselves change this from developer feedback, but I'd like to make some decision for MVP. I [suggested on esdiscuss](https://esdiscuss.org/topic/float-denormal-issue-in-javascript-processor-node-in-web-audio-api#content-3) that JavaScript go full unspecified, and just do DAZ/FTZ because it's often faster. Yes, x86 is better than it used to be but that's not universal, ignores current hardware, and doesn't look towards what new hardware will do. I like leaving the door open :-)\r\n\r\nFor @sunfishcode searchability, I'll use the word \"subnormals\" too :-)"},"comment":{"url":"https://api.github.com/repos/WebAssembly/design/issues/comments/118064978","html_url":"https://github.com/WebAssembly/design/issues/148#issuecomment-118064978","issue_url":"https://api.github.com/repos/WebAssembly/design/issues/148","id":118064978,"user":{"login":"pizlonator","id":12176955,"avatar_url":"https://avatars.githubusercontent.com/u/12176955?v=3","gravatar_id":"","url":"https://api.github.com/users/pizlonator","html_url":"https://github.com/pizlonator","followers_url":"https://api.github.com/users/pizlonator/followers","following_url":"https://api.github.com/users/pizlonator/following{/other_user}","gists_url":"https://api.github.com/users/pizlonator/gists{/gist_id}","starred_url":"https://api.github.com/users/pizlonator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pizlonator/subscriptions","organizations_url":"https://api.github.com/users/pizlonator/orgs","repos_url":"https://api.github.com/users/pizlonator/repos","events_url":"https://api.github.com/users/pizlonator/events{/privacy}","received_events_url":"https://api.github.com/users/pizlonator/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T15:17:14Z","updated_at":"2015-07-02T15:17:14Z","body":"This makes perfect sense to me. \n\n-Fil\n\n> On Jul 1, 2015, at 5:22 PM, Dan Gohman <notifications@github.com> wrote:\n> \n> Here is a discussable proposal which I believe gives most people what they want, though it makes some tradeoffs (as any proposal must):\n> \n> Default to full support for subnormals.\n> A function attribute sets either \"standard\" or \"maybe_flush\", with \"maybe_flush\" meaning that it's nondeterministic whether subnormals are flushed as input and/or output at each operation within the function body (and does not apply within called functions).\n> Float32x4 is not accelerated on 32-bit NEON in standard mode, but is in \"maybe_flush\" mode.\n> The following questions seem interesting:\n> \n> Is \"standard' the right default? Losing Float32x4 on 32-bit NEON by default is not pretty (though compilers and tools could help detect problems and guide developers to solutions). Compiler flags are a nuisance. However, abrupt underflow is also sometimes problematic, and it's non-IEEE, so it's a question of priorities and perhaps also short-term versus long-term.\n> \n> Is function-body the right scope for mode switching? It's somewhat fine-grained, but also gives implementations a natural optimization boundary, because dealing with mode changes in the middle of a function is awkward. Inlining can blur such boundaries, but optimizers would at least have the option of declining to do inlining (or other interprocedural optimizations) across boundaries where the modes differ. And implementations might be able to avoid the cost of mode switching across many function boundaries when the mode doesn't actually change.\n> \n> Is \"maybe_flush\" what we want, or would a straight \"flush\" be better? \"maybe_flush\" avoids requiring CPUs to have both DAZ and FTZ flags. And, some implementations may wish to stay in \"standard\" mode in some cases. But, it does introduce nondeterminism which could lead to different problems.\n> \n> ―\n> Reply to this email directly or view it on GitHub.\n> \n"}}