My post only about your "revision" of possible algos part.
As to your task in last post - you can do it with 1 instruction
not 18.
Posted on 2003-07-08 18:34:34 by The Svin

As to your task in last post - you can do it with 1 instruction
not 18.
Yes, of course. :) My assembler is a better example - less than 30 instructions to determine what instruction of 1024 is being assembled and jump to handler. My table is 8K - I'm sure you could do it in one instruction and a little less than 2 gigabytes for the table. ;) (come to think of it, 4meg would be enough, but there would be many holes in memory)
Posted on 2003-07-08 18:54:37 by bitRAKE
32 bytes table would be enough.
Posted on 2003-07-08 20:49:35 by The Svin
You mean : a 256-bit table, I assume. 8*32=256 :grin:

Each bit set to 1 means "primary", u just have to test if (array & (1<<(x modulo 8))) <> 0,
or better (array & (1<<(x&7))) <> 0

Well, OK for tiny arrays... always the same pb with their stupidly tiny L1 cache. (thx AMD though)
Posted on 2003-07-09 06:58:53 by valy

32 bytes table would be enough.
Really? How can 1024 different instructions be recognized in 32 bytes? Given a string of bytes and the length of the token; set a flag if the string is not an instruction, else branch to instruction processing. I don't preprocess the file like in FASM.
Posted on 2003-07-09 08:47:24 by bitRAKE
bitRAKE, please, read carefully my post.
I've said:
As to your task in last post

This is your words in last post I meant:
My method takes less than <18 instuctions to determine if a byte is prime,


About this, and only this task, I've said.
1 instruction not 18.
32 bytes (256 bits) table.
It's clear that by "1 instruction" I meant bt.

As too your method - I don't even start talking about it yet.
So, please, take it easy.
I've just added addition to your "foreword" part - where
you enumerated some contra-method, and I, in just academic sence, extended one scanner method.
Posted on 2003-07-09 14:40:19 by The Svin

So, please, take it easy.
I take it easy. :grin: Sorry, for the miss-understanding.
Posted on 2003-07-09 14:50:56 by bitRAKE