{"action":"created","issue":{"url":"https://api.github.com/repos/dhewm/dhewm3/issues/194","repository_url":"https://api.github.com/repos/dhewm/dhewm3","labels_url":"https://api.github.com/repos/dhewm/dhewm3/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/dhewm/dhewm3/issues/194/comments","events_url":"https://api.github.com/repos/dhewm/dhewm3/issues/194/events","html_url":"https://github.com/dhewm/dhewm3/pull/194","id":337901514,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4OTY1MDcz","number":194,"title":"Lower release build optimizations from -O3 to -O2.","user":{"login":"Yamagi","id":1224576,"node_id":"MDQ6VXNlcjEyMjQ1NzY=","avatar_url":"https://avatars1.githubusercontent.com/u/1224576?v=4","gravatar_id":"","url":"https://api.github.com/users/Yamagi","html_url":"https://github.com/Yamagi","followers_url":"https://api.github.com/users/Yamagi/followers","following_url":"https://api.github.com/users/Yamagi/following{/other_user}","gists_url":"https://api.github.com/users/Yamagi/gists{/gist_id}","starred_url":"https://api.github.com/users/Yamagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yamagi/subscriptions","organizations_url":"https://api.github.com/users/Yamagi/orgs","repos_url":"https://api.github.com/users/Yamagi/repos","events_url":"https://api.github.com/users/Yamagi/events{/privacy}","received_events_url":"https://api.github.com/users/Yamagi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-03T13:34:02Z","updated_at":"2018-07-04T02:02:13Z","closed_at":"2018-07-03T14:34:46Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/dhewm/dhewm3/pulls/194","html_url":"https://github.com/dhewm/dhewm3/pull/194","diff_url":"https://github.com/dhewm/dhewm3/pull/194.diff","patch_url":"https://github.com/dhewm/dhewm3/pull/194.patch"},"body":"In the last few weeks I've played again through the game and kept an eye\r\non small oddities. And there're a lot of them. For example some GUIs and\r\nvideos getting stuck after the first frame (issue #192) or being unable\r\nto protect the guy with the lamp in Alpha Labs 3. Some digging proved\r\nthat most - if not all - of these problems are caused by the compilers\r\noptimization level. When build with -O2 both g++ 8.1 and clang 6.0.0 are\r\nproducing working code. g++ 8.1 with -O3 has some small, hard to notice\r\noddities, clang 6.0.0 with -O3 shows a lot of them. Since there's not\r\nmeasurable difference between -O3 and -O2 just go down to the later:\r\n\r\n```\r\nx doom_o3.txt\r\n+ doom_o2.txt\r\n+----------------------------------------------------------------------+\r\n|                                                               +      |\r\n|                                      +                        *      |\r\n|x                                     *           x            *      |\r\n|                 |_____________________|___A______M__A_________M___|_||\r\n+----------------------------------------------------------------------+\r\n\r\n    N        Min           Max        Median           Avg        Stddev\r\nx   5        173           178           177         176.4     2.0736441\r\n+   5        176           178           178         177.2     1.0954451\r\n```"},"comment":{"url":"https://api.github.com/repos/dhewm/dhewm3/issues/comments/402341171","html_url":"https://github.com/dhewm/dhewm3/pull/194#issuecomment-402341171","issue_url":"https://api.github.com/repos/dhewm/dhewm3/issues/194","id":402341171,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjM0MTE3MQ==","user":{"login":"DanielGibson","id":1216493,"node_id":"MDQ6VXNlcjEyMTY0OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1216493?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielGibson","html_url":"https://github.com/DanielGibson","followers_url":"https://api.github.com/users/DanielGibson/followers","following_url":"https://api.github.com/users/DanielGibson/following{/other_user}","gists_url":"https://api.github.com/users/DanielGibson/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielGibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielGibson/subscriptions","organizations_url":"https://api.github.com/users/DanielGibson/orgs","repos_url":"https://api.github.com/users/DanielGibson/repos","events_url":"https://api.github.com/users/DanielGibson/events{/privacy}","received_events_url":"https://api.github.com/users/DanielGibson/received_events","type":"User","site_admin":false},"created_at":"2018-07-04T02:02:13Z","updated_at":"2018-07-04T02:02:13Z","author_association":"MEMBER","body":"I'm quite sure it's not a real compiler bug (after all it affects both gcc and clang), but writing 100% conforming code is almost impossible at a large scale, and compilers tend to invent new interpretations of UB for new optimizations so it's a moving target anyway - and changing old code like this to be conformaning is probably even harder..\r\nI think it's quite common to avoid -O3 because it tends to break things; I don't remember why dhewm3 used it"}}
{"actor":{"display_login":"DanielGibson"}}