[Issue 5282] Optimize array comparison which use memcmp to something better and remove unnecessary indirections.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 1 14:50:33 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5282
Vladimir Panteleev <thecybershadow at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thecybershadow at gmail.com
--- Comment #7 from Vladimir Panteleev <thecybershadow at gmail.com> 2013-04-02 00:50:30 EEST ---
I've written a patch to optimize the simple case of comparison of arrays of
basic types (integral and void[]), which was merged yesterday:
http://d.puremagic.com/issues/show_bug.cgi?id=9477
https://github.com/D-Programming-Language/dmd/pull/1766
It uses the memcmp intrinsic. DMD currently does not do anything special if the
array length is known at compile-time (i.e. at least one of the arrays is
static), but I imagine smarter backends might take advantage of that and unroll
it, as mentioned in comment #2.
It would be possible to expand it to structs, if someone could implement the
checks as described in comment #3.
--
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