GDC does.
downs
default_357-line at yahoo.de
Mon May 19 00:21:00 PDT 2008
Bill Baxter wrote:
> Sadly, I believe what I have heard mentioned here on the NG is that DMD
> does *not* currently inline *any* functions that have ref args. Which
> is a serious problem, since performance is one reason you would switch
> to ref args in the first place. (To avoid passing large structs by value.)
>
FWIW, GDC does inline ref-arg functions.
Proof:
gentoo-pc ~ $ cat test42.d && echo "----" && gdc test42.d -o test42 -O3 -frelease && ./test42
module test42;
import std.stdio;
void test() {
void* foo; asm { mov foo, ESP; }
writefln("SP: ", foo);
}
void rtest(ref int x) { x++; test(); }
void main() {
int i = 0;
test();
rtest(i);
}
----
SP: BFC57840
SP: BFC57840
--downs
More information about the Digitalmars-d
mailing list