[Issue 859] New: Improve compiler inlining
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 19 23:23:44 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=859
Summary: Improve compiler inlining
Product: D
Version: 1.00
Platform: PC
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: digitalmars-com at baysmith.com
Compiler inlining of functions gives much worse performance than manually
inlined functions (at least in some cases). In the attached example, the
performance is 6 times slower.
C:\>dmd -O -inline -release -g testinline.d
C:\>testinline.exe
compiler inlined time: 374058
manually inlined time: 61362
C:\>obj2asm testinline.obj -ctestinline.asm
See line 486 for the compiler inlined code
See line 544 for the manually inlined code
The compiler inlined code extra instructions like the following:
lea ESI,-080h[EBP]
lea EDI,-048h[EBP]
movsd
movsd
movsd
lea ESI,-074h[EBP]
lea EDI,-03Ch[EBP]
movsd
movsd
movsd
These instructions are absent in the manually inlined code, and may be the
cause of the poor performance.
--
More information about the Digitalmars-d-bugs
mailing list