manual eqShPart
mainly to not suffer the cost of function invocation, as the common case is len==1
This commit is contained in:
parent
3dd1bffe2f
commit
3fa0463241
@ -90,7 +90,9 @@ static usz arr_csz(B x) {
|
||||
return r;
|
||||
}
|
||||
static bool eqShPart(usz* w, usz* x, usz len) {
|
||||
return memcmp(w, x, len*sizeof(usz))==0;
|
||||
// return memcmp(w, x, len*sizeof(usz))==0;
|
||||
NOUNROLL for (i32 i = 0; i < len; i++) if (w[i]!=x[i]) return false;
|
||||
return true;
|
||||
}
|
||||
static bool eqShape(B w, B x) { assert(isArr(w)); assert(isArr(x));
|
||||
ur wr = rnk(w); usz* wsh = a(w)->sh;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user