The more I think about it the more I think that a full 17-bit LUT, as you suggest, would be best. Only an experiment will tell :-)
On Thu, Oct 13, 2016 at 8:34 PM, Michal Dobrogost < michal.dobrog...@gmail.com> wrote: > A 17-bit lookup table for a 17x1024 sized Y would require 16 MB. The 4-bit > version is 10kb and would fit into the L1 cache. I believe the L1 vs RAM > access times are 1-to-60 or so (http://www.7-cpu.com/cpu/Haswell.html). > > Of course, maybe we use few enough Xs at any given time that the relevant > entries of a 17-bit LUT would be hot anyway. > > On Thu, Oct 13, 2016 at 8:04 PM, Raul Miller <rauldmil...@gmail.com> > wrote: > >> Simplest "high performance" version of that would be to pre-compute each >> of >> the possible answers for each possible X. >> >> -- >> Raul >> >> >> On Thu, Oct 13, 2016 at 9:33 PM, Michal Dobrogost < >> michal.dobrog...@gmail.com> wrote: >> >> > Yes, you can rewrite (+./@:*.) as (+./ . *.). >> > >> > Hehe, in terms of peculiar ways and unknown reasons, I invite you to >> think >> > about how you might go about implementing a high-performance version of >> > this operation where X and Y are restricted to boolean elements, Y is >> > static and X dynamically changes. >> > >> > On Thu, Oct 13, 2016 at 10:32 AM, Erling Hellenäs < >> > erl...@erlinghellenas.se> >> > wrote: >> > >> > > It is this operation +./ . *. we rewrite in peculiar ways for unknown >> > > reasons? >> > > >> > > [ x=: 1 0 1 1 0 >> > > >> > > 1 0 1 1 0 >> > > >> > > [ y=: 5 6 $1 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 >> > > >> > > 1 0 0 0 0 0 >> > > >> > > 0 1 0 1 1 0 >> > > >> > > 0 1 0 0 0 1 >> > > >> > > 0 0 0 0 1 1 >> > > >> > > 0 1 1 1 0 1 >> > > >> > > x +./ . *. y >> > > >> > > 1 1 0 0 1 1 >> > > >> > > >> > > /Erling >> > > >> > > >> > > >> > > ------------------------------------------------------------ >> ---------- >> > > For information about J forums see http://www.jsoftware.com/forum >> s.htm >> > > >> > ---------------------------------------------------------------------- >> > For information about J forums see http://www.jsoftware.com/forums.htm >> > >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm