[Issue 8536] OPTLINK crash with large fixed-size array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 10 19:49:22 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8536
--- Comment #3 from bearophile_hugs at eml.cc 2012-08-10 19:49:18 PDT ---
(In reply to comment #1)
> This is a well known Optlink bug, though I don't have the bugzilla number
> handy.
OK.
> You're wrong about it impeding optimizations compared with dynamically
> allocating it, for a couple reasons:
This is a discussion better fit for the D newsgroup.
In attach there are 3 nearly identical C programs, that use a 2D global cache
matrix to perform a certain simple (but not stupid) computation.
The test0 uses a dynamically allocated "array" of pointers to "arrays". The
test1 uses a static array of dynamically allocated rows, and the test2 uses a
fully static 2D matrix. Compiling with GCC 4.7.1 with "-std=c99 -Ofast -flto
-s" the run-times are 6.52, 6.07 and 4.95 seconds. The more the GCC compiler
knows statically about the arrays, the more efficient binary it produces.
--
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