On Fri, Feb 08, 2002 at 11:10:32PM +0100, Arnould Nazarian wrote: > > > I can think of a couple of things that can be addressed to improve/resolve > > the situation... > > If my memory serves me well: > > Slave blocks are areas of memory of 512 bytes organised in a linked > list. And in 128K of memory it is fast to look if a part of the needed > file is contained in one of the slave blocks. But in 32 MB, even with a > fast processor, it takes some time. Especially if the file must be read > one byte after the other and each time the OS forces a look into the > slave blocks (can you confirm that this is the mechanism?). > > One idea was to artificially force the pointer to end of slave blocks > have the same value as the pointer to start of slave blocks. But this > does not work IIRC. > > Another idea (I just got it): would it be possible to change the size of > the slave blocks from 512 bytes to 512 kbytes for example? Then there > would only be 64 possible slave blocks in 32 Mbytes. And the search for > a part of a file through the linked list of a very small number of slave > blocks would be a lot faster. Maybe this would be a not too difficult > hack of SMSQ/E?
this would not work, but there is really absolutely no magic to speed up the algorithm by a factor of 10000 or so. Any half or even 1/1000 decent hashing scheme would do that trivially.. that is actually an understatement. It is impossible to hack it into SMSQ without knowing how to disable the old code and link in the new.. Bye Richard
