www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 75] New: 4x performance regression of to!(char[]) from gcd 4.6

http://bugzilla.gdcproject.org/show_bug.cgi?id=75


           Summary: 4x performance regression of to!(char[]) from gcd 4.6
                    to 4.8
    Classification: Unclassified
           Product: GDC
           Version: 4.8.x
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: libgdruntime
        AssignedTo: ibuclaw gdcproject.org
        ReportedBy: pauljurczak yahoo.com


Created attachment 50
  --> http://bugzilla.gdcproject.org/attachment.cgi?id=50
Test code

This function:

int f(int N = 100_000) {   
   int len = 0;

   foreach (uint i; 1..N)
      len += to!(char[])(i).length; 

   return len;
}

runs 4 times slower when compiled with gcd 4.8 compared to gcd 4.6.

Run times and compilation details on Xubuntu 13.04 64-bit Core i5 3450S 2.8GHz
(3.5GHz turbo):

5.7ms  GDC 4.6.4:     
gdc -m64 -march=native -fno-bounds-check -frename-registers -frelease -O3

23ms   GDC 4.8.1:     
gdc -m64 -march=native -fno-bounds-check -frename-registers -frelease -O3

22ms   LDC 0.11.0:    
ldmd2 -m64 -O -noboundscheck -inline -release

30ms   DMD64 2.063.2: 
dmd -O -noboundscheck -inline -release

Attached is test code.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
Aug 21 2013