[Issue 2356] array literal as non static initializer generates horribly inefficient code.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 7 19:10:33 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=2356
dawg at dawgfoto.de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dawg at dawgfoto.de
--- Comment #6 from dawg at dawgfoto.de 2011-10-07 19:09:44 PDT ---
This is also a huge issue when assigning .init to a static array.
ubyte[1024] v;
v = typeof(v).init;
This will generate a dynamically allocated [0, 0, 0 ... ] Arrayliteral for the
rhs expression before calling _d_arraycopy. Even worse the allocated
ArrayLiteral is initialized using 1024 comma expressions. Using -O the compiler
will subsequently almost starve from O(N^2) behavior during comsub
eliminations.
--
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