Turbo Zippy by Mack Lifeguard 68000 Code by The Controller and NZO ~ A Dual Crew-Shining Production ~ Welcome! You have just acquired the fastest searching algorithm ever made for the Motorola 68000. In production for over 6 months by 2 leading 68000 coding experts, this tool employs the speediest and most efficient case-insensitive ASCII algorithm you will ever see. First of all, you should know that Turbo Zippy is 9 times faster than the standard Amiexpress (hereafter /X) "z" command. That means that if it was taking you 52 seconds to search a directory listing, Turbo Zippy (hereafter TZ) will do the job in 6 seconds. A substantial improvement. Why? Because the Lattice C searching algorithm in /X is very primitive and does not use optimized assembly language routines. Whereas TZ uses highly optimized 68000 code to directly address the CPU and memory. The TZ searching algorithm is the fastest known to the Amiga, it beats Cygnus Editor, Turbo Text, AmigaDOS Search command, and anything else with a search routine. Don't believe me? Read on. The /X "z" command loads a single line at a time, converts it to uppercase, and then searches it. Multiply this operation by 10,000 times and you can see why it's so slow. If you or a user is multi-tasking on the same drive, the /X zippy operation will take much, much longer--maybe even a few minutes. On the other hand, Turbo Zippy allocates a chunk of memory, loads in the entire file, then searches it as a whole. This method has been proven 9 times faster than the standard /X algorithm because the physical file is only accessed once, whereas /X grabs file information thousands of times. TZ also uses every single one of the 68000's 32-bit registers in a beautifully efficient manner for the absolute maximum speed increase. The mere source code is a work of art and is being considered by the authors for commercial release. You of course, get the tool for free. TZ looks and feels exactly like the /X "z" command. The only difference you will note is a dramatic speed increase and a few extra goodies. For example, a unique highlight mode has been added. Any keywords matched will be shown in a different color (an option most wordprocessors and editors lack). The search algorithm also allows full MS-DOS style wildcard pattern matching. No speed is lost and you will find this feature to come in very handy for finding obfusicated files (see Appendix A for more information on pattern matching). Also, you will notice that in addition to the standard "(y/n/ns)?" pause prompt, TZ offers file [F]lags and new [K]eywords options. All this in a tiny 8.6k file. You can really appreciate Turbo Zippy's search routine with big files. As you will see in table 1 below, the TZ turbochargers really kick in after 500k. Anything below that is just a breeze for TZ. Almost no waiting time. If you have an accelerated Amiga, the results will be almost instantaneous. When I tested these same files on a A4000, I couldn't click on the stop-watch fast enough to get accurate readings. Really! Following is a list of tests conducted with varied file sizes using the standard /X "z" command, TZ, and Cygnus Editor. The files (standard /X DIR lists) were all loaded from ram and the times were taken with a hand-held digital stopwatch. All times are in seconds. Tests were conducted using /X v3.0 and CED 2.12 on a standard 7.15909 Mhz A500 with 5 megs of ram. The keyword was ".abcd" on all tests. The keyword was never found so that scrolling speed wouldn't be a factor. The clock was started as soon as RETURN was hit at the /X prompt (and Search prompt on CED). The command in /X was "z .abcd 1". This test accurately gauges the total scan-time of each program. All times have an error margin of ±0.50 seconds. This error margin can be directly attributed to hand-eye response coordination when clicking on the stopwatch (±0.25 to start, ±0.25 to end). This is as scientific as it gets folks. Table 1 FILESIZE Amiexpress Cygnus Editor Turbo Zippy =================================================================== 1,245,496 52.57 seconds 16.55 seconds 5.96 seconds 618,516 26.32 seconds 7.01 seconds 3.77 seconds 353,074 15.28 seconds 4.19 seconds 2.65 seconds =================================================================== Appendix A Pattern Matching TZ features powerful pattern-matching capabilities not present in the /X zippy. TZ recognizes ? and * wild-cards and does so over 10x faster than the AmigaDos Search command. The character "?" matches any single character and "*" matches any number of characters. All patterns are case-insensitive. Here are some examples on how to make use of this feature. .txt*skid*row This will display all text files released by Skid Row. This will find things like "docs.txt Skid Row presents". atx*trainer All Anthrox trainers. dcs*exe This will display all .exe files released by DCS. 09*93 This will show you all the files in September, 93. 09-??-9? Same as above, but for all years from 1990-1999 09-*-01 Same but for the year 2001. Cool! 3????? All files that are 300k + NOTE: The pattern matching works on a line by line basis. So in a description like this: Demo.exe P 500123 01-03-94 This awesome demo is by the one and only Dual Crew Shining. Great music! TZ would not find "exe*dual" because that pattern does not occur on any 1 line. There are limits even to what Turbo Zippy can do! Appendix C The Expense Of Speed So what's the catch, you ask. In order to attain maximum speed, TZ loads the entire directory listing into memory. If you don't have enough memory on your system at one moment, TZ will give you an "out of memory" error. But never fear, when this problem occurs, TZ shuts down and kicks into "lamer mode", which loads the original /X zippy command, using the same arguments that were passed to TZ. The /X zippy command doesn't use more than 10k to search listings. So this is the catch: speed will cost you memory.