Optimize my code =)
Stanislav Blinov
stanislav.blinov at gmail.com
Tue Feb 18 02:20:36 PST 2014
...And if I define opEquals as it was made by Robin, i.e. like
this:
bool opEquals(ref const Matrix other) const pure nothrow {
version (all) {
if (dim != other.dim) return false;
foreach(immutable i, const ref e; data)
if (e != other.data[i])
return false;
return true;
} else {
return (dim == other.dim) && (data[] == other.data[]);
}
}
then the relevant benchmark on LDC flattens near zero time too x.x
More information about the Digitalmars-d-learn
mailing list