From 7600431fa6f858c7813aa24290e1192358772818 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 26 Sep 2021 14:02:05 +0300 Subject: [PATCH] fix slow small array checks --- src/core/stuff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/stuff.c b/src/core/stuff.c index 7f5d61fe..8229e9e9 100644 --- a/src/core/stuff.c +++ b/src/core/stuff.c @@ -738,7 +738,6 @@ B g_tf(void* x) { return tag(x,FUN_TAG); } } #endif #if WARN_SLOW==1 - BBB2B ptr; static void warn_ln(B x) { if (isArr(x)) print_fmt("%s items, %S, shape=%H\n", a(x)->ia, eltype_repr(TI(x,elType)), x); else { @@ -752,12 +751,12 @@ B g_tf(void* x) { return tag(x,FUN_TAG); } printf("slow %s: ", s); warn_ln(x); } void warn_slow2(char* s, B w, B x) { - if ((isArr(w)||isArr(x)) && (!isArr(x) || a(x)->ia<50) && (!isArr(x) || a(x)->ia<50)) return; + if ((isArr(w)||isArr(x)) && (!isArr(w) || a(w)->ia<50) && (!isArr(x) || a(x)->ia<50)) return; printf("slow %s:\n 𝕨: ", s); warn_ln(w); printf(" 𝕩: "); warn_ln(x); } void warn_slow3(char* s, B w, B x, B y) { - if ((isArr(w)||isArr(x)) && (!isArr(x) || a(x)->ia<50) && (!isArr(x) || a(x)->ia<50)) return; + if ((isArr(w)||isArr(x)) && (!isArr(w) || a(w)->ia<50) && (!isArr(x) || a(x)->ia<50)) return; printf("slow %s:\n 𝕨: ", s); warn_ln(w); printf(" 𝕩: "); warn_ln(x); printf(" f: "); warn_ln(y);