digitalmars.D.bugs - [Issue 797] New: Performance issue using "release" flag
- d-bugmail puremagic.com (62/62) Jan 05 2007 http://d.puremagic.com/issues/show_bug.cgi?id=797
- d-bugmail puremagic.com (11/11) Oct 14 2009 http://d.puremagic.com/issues/show_bug.cgi?id=797
http://d.puremagic.com/issues/show_bug.cgi?id=797 Summary: Performance issue using "release" flag Product: D Version: 1.00 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: david ferenczi.net I encountered some interesting performance differences in case of using release flag. The code (test_d.d): ----------------------------8<-------------------------------- int main() { const int arraySize = 30000; int[arraySize] myArray; for (int i = 0; i < arraySize; i++) { myArray[i] = i * i % 33; } for (int i = 0; i < arraySize; i++) { for (int j = i + 1; j < arraySize; j++) { myArray[(i+j)%arraySize] = (i + myArray[i] + myArray[j] * 17) % 33; } } return 0; } ----------------------------8<-------------------------------- The tests I made: $ dmd-1.00 test_d.d gcc test_d.o -o test_d -m32 -lphobos -lpthread -lm -Xlinker -L/opt/dmd/1.00/lib $ time ./test_d real 0m21.365s user 0m19.369s sys 0m0.236s $ dmd-1.00 -release test_d.d gcc test_d.o -o test_d -m32 -lphobos -lpthread -lm -Xlinker -L/opt/dmd/1.00/lib $ time ./test_d real 0m29.500s user 0m29.058s sys 0m0.344s $ dmd-1.00 -O test_d.d gcc test_d.o -o test_d -m32 -lphobos -lpthread -lm -Xlinker -L/opt/dmd/1.00/lib $ time ./test_d real 0m17.109s user 0m16.857s sys 0m0.200s $ dmd-1.00 -O -release test_d.d gcc test_d.o -o test_d -m32 -lphobos -lpthread -lm -Xlinker -L/opt/dmd/1.00/lib $ time ./test_d real 0m28.653s user 0m28.142s sys 0m0.352s Using the release flag I got dramatical worse performance. I also tested with dmd v0.173 and got the same results. --
Jan 05 2007
http://d.puremagic.com/issues/show_bug.cgi?id=797 David Ferenczi <david ferenczi.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from David Ferenczi <david ferenczi.net> 2009-10-14 11:53:06 PDT --- Tested with dmd v2.032 and it doesn't seem to be an issue anymore. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 14 2009