4 ms·
I think you're making the same mistakes as people on that thread. It's a long stretch from "there's some x87 assembly instructions and some function calls that
by vilya 15y ago
I think you're making the same mistakes as people on that thread. It's a long stretch from "there's some x87 assembly instructions and some function calls that could be inlined" to "they compiled with optimisations off".
It's entirely possible, for example, that the relevant code came from a 3rd party library that the game was statically linked against; or that they had to disable optimisations in parts of the code because they were found to cause bugs elsewhere.
Creating a rich interactive world the size of Skyrim is a considerable technical achievement, so I certainly don't think you can accuse the developers of incompetence.
- hmottestad 15y agoSo someone left the compiler optimization off. Anyway I reckon that during 3 years of development someone should have realized. Or it could be raw assembly code or inline assembly. These would usually not be optimized.
- nickolai 15y ago>disable optimisations in parts of the code because they were found to cause bugs elsewhere. Well that is exactly what I meant. Compiler optimizations by themselves do not cause bugs - they reveal bugs. They are specfically designed to be sematically equivalent[1]. Without the compiler optimizations the bugs may not manifest themselves, or only manifest themselves in particular conditions that may not be spotted by QA - but the bugged/unsafe code is still present. Any functional discrepancy between compiler-optimized and non-optimized code should be cause for concern. >Creating a rich interactive world the size of Skyrim is a considerable technical achievement, I wouldnt say that the size is a technical acheivement - the credit would mostly go to the artists there - and they did an amazing job. Although it would cerainly not be possible without a decent quality engine. Don't get me wrong. I really like skyrim, and have spent a lot of time with it. But I simply get the feeling that performance receives less and less attention in the modern products. [1]http://en.wikipedia.org/wiki/Compiler_optimization http://en.wikipedia.org/wiki/Compiler_optimization
- julian37 15y agoCompiler optimizations by themselves do not cause bugs - they reveal bugs. This is incorrect. Optimizations do often reveal bugs rather than causing them, but turning on optimizations can also cause bugs in itself. See for example: http://gcc.gnu.org/bugzilla/buglist.cgi?short_desc=optimization%20bug&resolution=---&resolution=FIXED&cf_known_to_fail_type=allwords&cf_known_to_work_type=allwords&query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&short_desc_type=allwordssubstr&product=gcc http://gcc.gnu.org/bugzilla/buglist.cgi?short_desc=optimizat...
- sharpneli 15y agoThese are due to bugs in the compiler, not inherent property of optimizations. It's quire rare for anyone to hit a optimizer bug and when it happens one can always selectively disable the buggy optimization method. Disabling all optimizations kinda overdoes it.
- hiidiot 15y agoFeel free to differentiate between bug types for an audience which has purchased your software. I am sure they'll be fascinated by your explanations.
- j_s 15y ago>Compiler optimizations by themselves do not cause bugs - they reveal bugs. They are specfically designed to be sematically equivalent. > Any functional discrepancy between compiler-optimized and non-optimized code should be cause for concern. I agree that functional discrepancies are a cause for concern, but compilers have bugs too (and games programmers tend to push the limits).
- vilya 15y agoCompiler optimisations aren't always designed to be semantically equivalent - for instance options which control floating point behaviour, like -ffast-math in gcc. That aside, sometimes compilers themselves have bugs as others have pointed out (I found one once involving a combination of python, boost, exceptions and the Intel C++ compiler - which only happened at -O3, not at -O2). Or you might not be able to use certain settings because it would be incompatible with some thirdparty library that you don't have the source to. Re: the size, the technical achievement is in managing all the content, how you interact with it and how it interacts with itself, etc. It's doing quite a lot of I/O to pull in the right assets at the right time - not to mention some computational geometry to figure out which are the right assets; running lots of AI for the creatures & NPCs; balancing memory usage between RAM & VRAM; simulating a night & day cycle, with weather too; rendering it all in (usually!) less than 30 milliseconds; and more besides. I certainly don't mean to play down the achievement of the artists involved, but don't underestimate the technical side either!