Bug 12509 – Compiler performance highly depends on declared array size - for struct with long static array of structs

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-04-02T23:16:00Z
Last change time
2014-04-08T05:51:06Z
Keywords
performance, pull
Assigned to
nobody
Creator
coolreader.org

Attachments

IDFilenameSummaryContent-TypeSize
1342main.dSource file to reproduceapplication/octet-stream463

Comments

Comment #0 by coolreader.org — 2014-04-02T23:16:28Z
Created attachment 1342 Source file to reproduce DMD 2.065 under winXP/32 compiles following example very slow > dmd main.d (compliles very slow) Not reproduced with 64bit compiler on linux --- main.d -------------------------- module main; struct Foo // must be struct to reproduce { uint foo; // any data can be here } struct Bar // must be struct to reproduce { // DMD 2.065 hang with 100% CPU load // works ok if array size is reduced Foo[0x20000] _array; // 0x4000 - < 1 second // 0x8000 - 5 seconds // 0xC000 - 15 seconds // 0xE000 - 20 seconds // 0x10000 - 25 seconds // 0x20000 - 1:45 } int main(string[] argv) { return 0; } ---------------------------------------
Comment #1 by andrej.mitrovich — 2014-04-05T08:30:56Z
*** Issue 12525 has been marked as a duplicate of this issue. ***
Comment #2 by dlang-bugzilla — 2014-04-05T08:32:03Z
This is a regression in 2.064.2.
Comment #3 by dlang-bugzilla — 2014-04-05T08:40:29Z
Comment #4 by k.hara.pg — 2014-04-05T23:20:11Z
Comment #5 by github-bugzilla — 2014-04-08T05:26:05Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f111434251af84e90abc709a49527ec76b9e1a97 fix Issue 12509 - Compiler performance highly depends on declared array size - for struct with long static array of structs https://github.com/D-Programming-Language/dmd/commit/db2291fc32b08187fb5862eefe3160a3e6b3dd90 Merge pull request #3425 from 9rnsr/fix12509 [REG2.064] Issue 12509 - Compiler performance highly depends on declared array size - for struct with long static array of structs