{"action":"created","issue":{"url":"https://api.github.com/repos/JACoders/OpenJK/issues/668","labels_url":"https://api.github.com/repos/JACoders/OpenJK/issues/668/labels{/name}","comments_url":"https://api.github.com/repos/JACoders/OpenJK/issues/668/comments","events_url":"https://api.github.com/repos/JACoders/OpenJK/issues/668/events","html_url":"https://github.com/JACoders/OpenJK/issues/668","id":77073476,"number":668,"title":"Investigate Link Time Code Generation/Link Time Optimisation","user":{"login":"xycaleth","id":1146859,"avatar_url":"https://avatars.githubusercontent.com/u/1146859?v=3","gravatar_id":"","url":"https://api.github.com/users/xycaleth","html_url":"https://github.com/xycaleth","followers_url":"https://api.github.com/users/xycaleth/followers","following_url":"https://api.github.com/users/xycaleth/following{/other_user}","gists_url":"https://api.github.com/users/xycaleth/gists{/gist_id}","starred_url":"https://api.github.com/users/xycaleth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xycaleth/subscriptions","organizations_url":"https://api.github.com/users/xycaleth/orgs","repos_url":"https://api.github.com/users/xycaleth/repos","events_url":"https://api.github.com/users/xycaleth/events{/privacy}","received_events_url":"https://api.github.com/users/xycaleth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JACoders/OpenJK/labels/CMake","name":"CMake","color":"7F00FF"},{"url":"https://api.github.com/repos/JACoders/OpenJK/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/JACoders/OpenJK/milestones/5","html_url":"https://github.com/JACoders/OpenJK/milestones/Milestone%202","labels_url":"https://api.github.com/repos/JACoders/OpenJK/milestones/5/labels","id":399527,"number":5,"title":"Milestone 2","description":"Second milestone for public release.","creator":{"login":"xycaleth","id":1146859,"avatar_url":"https://avatars.githubusercontent.com/u/1146859?v=3","gravatar_id":"","url":"https://api.github.com/users/xycaleth","html_url":"https://github.com/xycaleth","followers_url":"https://api.github.com/users/xycaleth/followers","following_url":"https://api.github.com/users/xycaleth/following{/other_user}","gists_url":"https://api.github.com/users/xycaleth/gists{/gist_id}","starred_url":"https://api.github.com/users/xycaleth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xycaleth/subscriptions","organizations_url":"https://api.github.com/users/xycaleth/orgs","repos_url":"https://api.github.com/users/xycaleth/repos","events_url":"https://api.github.com/users/xycaleth/events{/privacy}","received_events_url":"https://api.github.com/users/xycaleth/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":5,"state":"open","created_at":"2013-08-12T06:59:18Z","updated_at":"2015-05-16T16:22:12Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-05-16T16:22:12Z","updated_at":"2015-05-17T06:49:56Z","closed_at":null,"body":"By default compilers cannot inline uses of a function which are defined in a separate translation unit (i.e. different source file). This means all of the vector functions which were previously macros are no longer inlined. Some compilers are able to do this though through link time code generation/optimisation, and this allows functions from different files to be inlined.\r\n\r\nUsing the MSVC 2013 compiler, there's a noticeable performance improvement (10%+) when enabling link time code generation (add `/GL` compiler flag, and `/LTCG` linker flag) and marking the `DotProduct` function with the `QINLINE` keyword and inspecting the assembly shows that the function does indeed get inlined. Without the `QINLINE` keyword, the function does not get inlined.\r\n\r\nGCC has a similar ability called Link Time Optimization, but I'm not sure what exactly is required to get this to work as expected."},"comment":{"url":"https://api.github.com/repos/JACoders/OpenJK/issues/comments/102756165","html_url":"https://github.com/JACoders/OpenJK/issues/668#issuecomment-102756165","issue_url":"https://api.github.com/repos/JACoders/OpenJK/issues/668","id":102756165,"user":{"login":"Razish","id":844370,"avatar_url":"https://avatars.githubusercontent.com/u/844370?v=3","gravatar_id":"","url":"https://api.github.com/users/Razish","html_url":"https://github.com/Razish","followers_url":"https://api.github.com/users/Razish/followers","following_url":"https://api.github.com/users/Razish/following{/other_user}","gists_url":"https://api.github.com/users/Razish/gists{/gist_id}","starred_url":"https://api.github.com/users/Razish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Razish/subscriptions","organizations_url":"https://api.github.com/users/Razish/orgs","repos_url":"https://api.github.com/users/Razish/repos","events_url":"https://api.github.com/users/Razish/events{/privacy}","received_events_url":"https://api.github.com/users/Razish/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T06:49:56Z","updated_at":"2015-05-17T06:49:56Z","body":"Clang also has very impressive link-time optimisation, adding on quite some time to the end of compilation =P\r\nWhich reminds me, we really should look into other optimisation and related flags, i.e. `-fomit-frame-pointer`,  `-ffloat-store`, `-mtune=` and FP controls like `-mfpmath=`, `-fexcess-precision=`"}}