faster F˘´n‿2⥊𝕩 for pervasive F

This commit is contained in:
dzaima 2023-03-03 17:45:16 +02:00
parent fd72d416db
commit 76d26db4c2

View File

@ -315,6 +315,8 @@ static NOINLINE B match_cells(bool ne, B w, B x, ur wr, ur xr, usz len) {
}
B shape_c1(B, B);
B transp_c1(B, B);
B insert_c1(Md1D* d, B x);
B cell_c1(Md1D* d, B x) { B f = d->f;
if (isAtm(x) || RNK(x)==0) {
B r = c1(f, x);
@ -355,7 +357,11 @@ B cell_c1(Md1D* d, B x) { B f = d->f;
if (v(f)->type == t_md1D) {
Md1D* fd = c(Md1D,f);
u8 rtid = fd->m1->flags-1;
if (rtid == n_const) { f=fd->f; goto const_f; }
if (rtid==n_const) { f=fd->f; goto const_f; }
if ((rtid==n_fold || rtid==n_insert) && TI(x,elType)!=el_B && isPervasiveDy(fd->f) && RNK(x)==2 && SH(x)[1]==2) {
x = C1(transp, x);
return insert_c1(fd, x);
}
}
}
} else if (!isMd(f)) {