Monday, July 6, 2015

Embedded-Text Search Method Now Renders Quicker

For the nitty-gritty-minded:


A significant increase in processing speed I gained by eliminating repetitive code that was only needed to avoid an error during the end-of-file encounter. Instead of continually end-checking for an “overflow” event, to know I reached the end, using the following AND logic:
... && ... !== undefined ...
(embedded in so many IF statements!), I simply added a few bytes to the end of my database array, an “EOF” record, setting its indexing parameter beyond the record above it (i.e., "one chapter ahead").

This component of many IF statements can now be eliminated because only the greater-than comparison - by itself - is needed, even at the end-of-file situation.

Although this did improve processing speed, it’s still not fast enough to combine the 0-50 and 51-100 skip options into one (“0 - 100”) (and to an another option, eg, 101-200).

No comments:

Post a Comment