{"action":"created","issue":{"url":"https://api.github.com/repos/OliverSch/compiler/issues/87","labels_url":"https://api.github.com/repos/OliverSch/compiler/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/OliverSch/compiler/issues/87/comments","events_url":"https://api.github.com/repos/OliverSch/compiler/issues/87/events","html_url":"https://github.com/OliverSch/compiler/issues/87","id":56167641,"number":87,"title":"CSE + Constant Optimization does not trigger","user":{"login":"felixwilhelm","id":2214289,"avatar_url":"https://avatars.githubusercontent.com/u/2214289?v=3","gravatar_id":"","url":"https://api.github.com/users/felixwilhelm","html_url":"https://github.com/felixwilhelm","followers_url":"https://api.github.com/users/felixwilhelm/followers","following_url":"https://api.github.com/users/felixwilhelm/following{/other_user}","gists_url":"https://api.github.com/users/felixwilhelm/gists{/gist_id}","starred_url":"https://api.github.com/users/felixwilhelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixwilhelm/subscriptions","organizations_url":"https://api.github.com/users/felixwilhelm/orgs","repos_url":"https://api.github.com/users/felixwilhelm/repos","events_url":"https://api.github.com/users/felixwilhelm/events{/privacy}","received_events_url":"https://api.github.com/users/felixwilhelm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-01T15:55:05Z","updated_at":"2015-02-01T16:23:18Z","closed_at":null,"body":"This seems to be the reason why we are extremly slow for programs like Pi.\r\n\r\n\tint scale = 400000000;\r\n\t\tint i = 3;\r\n\t\tboolean plus = false;\r\n\t\tint currVal = scale;\r\n\t\tint maxInt = pi.getMaxInt();\r\n\t\tSystem.out.println(maxInt);\r\n\t\twhile (i < maxInt) {\r\n\t\t\tif (plus) {\r\n\t\t\t\tcurrVal = currVal + scale / i;\r\n\t\t\t} else {\r\n\t\t\t\tcurrVal = currVal - scale / i;\r\n\t\t\t}\r\n\r\nscale / i is not calculated once before the loop but instead calculated again for each iteration. \r\nDoes someone has any ideas why this might the case?"},"comment":{"url":"https://api.github.com/repos/OliverSch/compiler/issues/comments/72371292","html_url":"https://github.com/OliverSch/compiler/issues/87#issuecomment-72371292","issue_url":"https://api.github.com/repos/OliverSch/compiler/issues/87","id":72371292,"user":{"login":"felixwilhelm","id":2214289,"avatar_url":"https://avatars.githubusercontent.com/u/2214289?v=3","gravatar_id":"","url":"https://api.github.com/users/felixwilhelm","html_url":"https://github.com/felixwilhelm","followers_url":"https://api.github.com/users/felixwilhelm/followers","following_url":"https://api.github.com/users/felixwilhelm/following{/other_user}","gists_url":"https://api.github.com/users/felixwilhelm/gists{/gist_id}","starred_url":"https://api.github.com/users/felixwilhelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixwilhelm/subscriptions","organizations_url":"https://api.github.com/users/felixwilhelm/orgs","repos_url":"https://api.github.com/users/felixwilhelm/repos","events_url":"https://api.github.com/users/felixwilhelm/events{/privacy}","received_events_url":"https://api.github.com/users/felixwilhelm/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T16:23:18Z","updated_at":"2015-02-01T16:23:18Z","body":"Vergesst es habe die Addition zu i übersehen ... "}}