compiler-optimization
Visual C++ Compiler Optimization Flags: Difference Between /O2 and /Ot
What\'s the difference between 开发者_开发技巧the /Ot flag (\"favor fast code\") and the /O2 flag (\"maximize speed\")?[详细]
2023-03-05 19:27 分类:问答Dynamic Dispatch Implementations
I am currently looking for various ways to impl开发者_如何学Cement dynamic dispatch. As far as I know, there are two \"easy\" ways to implement this:[详细]
2023-03-05 05:31 分类:问答How can inlining in C actually be slowing down this program?
In order to force a function to not be inlined that was consuming 46% of the runtime, I used __attribute__((no开发者_如何学JAVAinline)) on the it and compiled the code with gcc -Wall -Winline -O2(thes[详细]
2023-03-03 03:21 分类:问答GCD test - to test dependency between loop statements
I understand how the GCD works on a trivial example as below: for(i=1; i<=100; i++) { X[2*i+3] = X[2*i] + 50;[详细]
2023-03-01 15:37 分类:问答Why prefer /Ob1 over /Ob2 in Visual C++ 9 when there're no tight limitations on executable size?
Visual C++ features /Ob compiler option that controls function inlining. With /Ob1 only functions marked inline, __inline or defined within the class declaration are inlined, while with /Ob2 all fun开[详细]
2023-03-01 04:50 分类:问答Declaring a type without providing the name
I\'ve tested some code on gcc in debug mode, but not sure it will work correct for other compilers. My question is how will any compiler optimize the following c++ code (make_auto macro):[详细]
2023-03-01 00:03 分类:问答Loop unrolling and data cache performance
Does loop unrolling effect data cache performance in any way? This is related to a homework I have which requires me to simulate code on simplescalar sim-cache to test the effect of loop tiling, memor[详细]
2023-02-28 02:39 分类:问答Unknown compiler "optimizations" make no sense
I was looking at the disassembly of some code I compiled with Visual Studio 2008, and I see some weird \"optimizations\" litter throughout the code that don\'t quite make sense when functions are call[详细]
2023-02-27 13:13 分类:问答Building sqlite for windows in a proper way
My problem is no matter how I build sqlite - my binary is much slower than the precompiled one on sqlite download page (about 3 - 6 times depending on[详细]
2023-02-26 22:50 分类:问答How to optimize this function with the compiler?
I have been doing the course on Compiler and Tools (this semester). I ha开发者_开发知识库ve read till intermediate code generation and also saw DAG representation for optimality. One thing is clear wi[详细]
2023-02-24 11:41 分类:问答