On 5/23/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
but per shootout rules:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=nsievebits&lang=all

Well... based on those shootout rules, I'd think I'd write:

  M=: 10000  *  2 ^ -&0 1 2
  pbits=: >:@i. e. i.&.(p:^:_1)
  nsieve=: +/@pbits"[EMAIL PROTECTED]

After all, the benchmark specs explicitly state that I only need to
set or clear the flag values as necessary.

But I could certainly write a faster and more compact version
of nsieve if I weren't following the rules of the benchmark:

  p:^:_1 M 2
4203 2262 1229

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to