| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Comments:
<0> dude <1> havent really looked too closely at it <0> and that function would be totally radical if it were inline <2> blah, the compiler will inline it if it feels like it <3> no, i don't think so <2> it's out of our hands, Jeremy <3> i don't think anything is inlined w/o 'inline' <3> the opposite is true, though
<3> even 'inline' functions might easily be not inlines <0> yes <2> actually int increment(int x) { return x+1; } would be inlined <2> etc <0> it may not inline it <2> bet? <3> after i check <2> of course <3> nope, it doesn't <4> does the compiler tag functions that only do simple arithmetic with predefined values as worthy of inlining? <4> doesn't even need to be predefined values, actually <3> just as i said abover <4> that makes it much simpler though <4> what are the criteria for inlining automatically i wonder <4> with say gcc <3> there s no automatic inlining. period. <3> (without explicit 'inline' keyword.) <3> maybe in other languages <3> not in C <0> in C++ there is <0> it can <0> can be annoying <0> in debugging <0> :P <2> eMishGLX, was inlined with /O1 (optimize for size) <0> but the "let the compiler decide for you" comment is overly used <3> obviously the answer is compiler-dependent <2> this majestic code: http://rafb.net/paste/results/ETke6U24.html <0> yes <2> msvc ignores "inline" per se, also "__inline"
<2> yesterday i got it to finally inline with "__forceinline" <5> optimize for size is slooow <3> yes, with -Os gcc does auto-inline <2> not necessarily, smaller size == better chance to fit in cache <3> but not with -O <3> and not with -O2 <2> zid`, I read some folklore that Microsoft compiles everything for size <3> which is what i normally use <3> it's weird that -O2 doesn't auto-inline <3> i just knew it doesn't <3> i never use -Os <3> but what chance is for auto-inlining if function body is not in .h ? <3> and if you put func body into .h, then you use 'static inline' <2> eMishGLX, funnily, if the function body is in the cpp, and *even* in an already compiled .obj, link time code generation may still pull it out and inline it, if it would suit the purpose <2> (MS) <2> so the linker is a pretty solid compiler :) <6> can scanf() get strings with spaces? <3> Symm: MSVC can do this ? <3> you sure ? <3> honestly, i don't believe <3> this is totally not linker job <3> and it's never dumb*** cut-and-paste of the code. it requires intelligent code rewriting wrt registers use <2> eMishGLX, yeah. google ltcg or link time code generation <2> it's a VC 7.1 and up feature <2> indeed, requires a lot of smarts <2> BUT <2> the .obj code is not pure binary <2> it's some intermediate language <2> so it's easier on the linker to finally compile it <4> haha <3> i wonder whether gcc whether picks this up <4> why the *hell* is the linker doing compilatio <4> n <4> that's crazy <3> *ever <3> "The /LTCG option tells the linker to call the compiler and perform whole program optimization." <3> so it's not really linker
Return to
#c or Go to some related
logs:
#bsd #fedora #nhl #gentoo #beginner VIADSE japanese toilettes the whole livery line bow down like this with the big money #beginner gentoo cron 3am
|
|