From 44c0baee05c800a2253c0710e0d9cb5a1dc20164 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 3 Sep 2022 14:07:17 -0400 Subject: [PATCH] No need to initialize the negative half of the counts table --- src/builtins/sfns.c | 65 +++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/src/builtins/sfns.c b/src/builtins/sfns.c index 5d913728..b10e8359 100644 --- a/src/builtins/sfns.c +++ b/src/builtins/sfns.c @@ -720,38 +720,39 @@ B slash_im(B t, B x) { decG(x); return num_squeeze(r); } #define CASE_SMALL(N) \ - case el_i##N: { \ - i##N* xp = i##N##any_ptr(x); \ - usz m=1<xp[a-1]) a++; \ - max=xp[a-1]; \ - if (a==xia) { /* Sorted unique argument */ \ - usz ria = max + 1; \ - u64* rp; r = m_bitarrv(&rp, ria); for (usz i=0; imax) max=c; } \ - if ((i##N)max<0) thrM("/⁼: Argument cannot contain negative numbers"); \ - usz ria = max+1; \ - i##N* rp; r = m_i##N##arrv(&rp, ria); for (usz i=0; ixp[a-1]) a++; \ + max=xp[a-1]; \ + if (a==xia) { /* Sorted unique argument */ \ + usz ria = max + 1; \ + u64* rp; r = m_bitarrv(&rp, ria); \ + for (usz i=0; imax) max=c; } \ + if ((i##N)max<0) thrM("/⁼: Argument cannot contain negative numbers"); \ + usz ria = max+1; \ + i##N* rp; r = m_i##N##arrv(&rp, ria); for (usz i=0; im/2) thrM("/⁼: Argument cannot contain negative numbers"); \ + i32* rp; r = m_i32arrv(&rp, ria); for (usz i=0; i