Study: build times for D programs
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Fri Jul 27 01:09:48 PDT 2012
On 27/07/12 07:29, Iain Buclaw wrote:
> -inline is mapped to -finline-functions in GDC. Inlining is possibly
> done, but only in the backend.
>
> Some extra notes to bear in mind about GDC.
> 1) All methods and function literals are marked as 'inline' by default.
> 2) Cross module inlining does not occur if you are compiling one-at-a-time.
Good to know. In this case it's all compiled together in one go:
###############################################
DC = gdmd
DFLAGS = -O -release -inline
DREGSRC = dregs/core.d dregs/codetermine.d
all: test
test: test.d $(DREGSRC)
$(DC) $(DFLAGS) -of$@ $^
.PHONY: clean
clean:
rm -f test *.o
###############################################
I'm just surprised that using -inline produces no measurable difference at all
in performance for GDC, whether or not any other optimization flags are used.
As I said, maybe I'll test some manual inlining and see what difference it might
make ...
More information about the Digitalmars-d
mailing list