[sword-devel] Comming soon: new improved sword searching
Mon, 09 Sep 2002 20:12:55 +0600
Bible is 31102 (if I counted correctly) verses. It is ~3.8Kbytes if a bit for
Searching for "Christ & (God | Father)" we can construct 3 such bit vectors
(~10.6Kbytes) and then make logical operations over these.
Such the way we can implement reasonably fast searching in paragraphs instead
of verses using indexes because with logical/shift operators with bit vectors
these can be transformed in the necessary way. (We should transform bit
vectors of verses to the corresponding bit vectors of paragraphs (oring the
verses in one paragraph) before doing the operations.)
I can (as will have time) even write necessary algorithms. If it will be too
slow for 80386, I can remember its assembler!
Moreover for often encountered words (like "the") we can even use an alternate
index file format with bit vectors.
P.S. On a Z80 3.5 Mhz ZX Spectrum I calculated 256x192 field for the well
known life-game (we create a World with certain "physics" and like God see its
development and can do "wonders") in 1.5 sec (independingly of input data). If
wanting I could be able to make it even faster.
Victor Porton (firstname.lastname@example.org)