[Issue 5276] New: Template compilation slower than G++ 4.5
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 25 20:19:00 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5276
Summary: Template compilation slower than G++ 4.5
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: performance
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-11-25 20:17:36 PST ---
Created an attachment (id=832)
D2 version of the benchmark
This performance bug may share the same cause of bug 4900
If this turns out to be true then we may close this as resolved duplicated.
In attach there are two programs that perform many computations at compile time
using just templates, one written in C++ and one in D2.
This is not idiomatic D code, because for this purpose CTFE is better, but it
may be good enough as first performance benchmark for templates.
Compilation time (N=7): G++ 0.95 seconds, dmd 12.4 seconds.
G++ uses about 34 MB RAM, DMD about 130+ MB RAM.
I have used MinGW 4.5.1 and DMD 2.050.
Compilation:
g++ nqueens_cpp.cpp -o nqueens_cpp
dmd nqueens_d.d
See also:
http://cpptruths.blogspot.com/2010/03/faster-meta-programs-using-gcc-45-and.html
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list