Short: Patch CopyMem/Quick for 68060(040) v1.1b Author: dbusse@metronet.de (Dirk Busse) Uploader: dbusse@metronet.de (Dirk Busse) Type: util/boot Requires: 68060 or 68040 Description: This is a small patch which replace the CopyMem and CopyMemQuick funtions of exec.library. These functions are optimized for the 68060 processor. They should also work with the 68040 processor. The patch tests for a 68040 or 060 processor. If it can't find one, it doesn't install the patch and exits with a return code of 20 (=fail). It also fails, if it can't allocate the necessary memory. In some cases these new functions are four times faster than the original functions. Installation: Just copy CMQ060 into c: And insert CMQ060 in your s:Startup-Sequence The source code is also in the archive. Author: Dirk Busse <100.141999@germanynet.de> How often are the functions used? Some people told me, they couldn't notice a speed improvement. You couldn't get a speed improvement by a factor of two. But there is a little speed improvement, even if you couldn't notice it. To show you how often the patched functions are called, I've inserted two modified patches into Version 1.1b of this archive. CMQ060beep: Every time one of the patched functions CopyMem or CopyMemQuick is called, your AMIGA makes a DisplayBeep. After calling LoadWB your AMIGA beeps very often per second. If you boot your AMIGA without Startup-Sequence and install CMQ060beep, you could see, every AMIGA dos command like Dir, List, Avail, Resident... is using the patched functions. They all are using the CopyMem function. And this is the function with the most speed improvement. CMQ060beepCMQ: This will only make a DisplayBeep, if the patched CopyMemQuick function is called. So it shows you which programms are using the patched CopyMemQuick function. For Example: PageStream3.3 while moving a scrollbar or making a redraw or TeleInfo2 or ... . Speed comparision: There are already some similar patches available on the Aminet: CopyMemQuicker V2.8 from 1994 -> Aminet:util/boot/COPMQR28.lha PCM V1.0 from 1996 -> Aminet:util/boot/PCM_1.0.lha Also MCP patches these functions. CopyMemQuicker is optimized for a 68000,010 and 020 processor. But on a 68060 (I think also on a 68040) you could get some more speed improvement. PCM is optimized for the 68040 and 060 processor. But some copy modes like Long to Even aren't optimized. And the copy mode Long+1 to Even+1 needs twice the time as the original exec function. In a lot of cases the patched functions from MCP are the slowest of all. Some copy modes are even slower than the original Kickstart 3.1 functions. Here are some test results. All results are measured on the same AMIGA 2000 with DKB WildFire060-50MHz: TestIt from CopyMemQuicker V2.8 original CopyMemQuicker MCP PCM CMQ060 Kickstart3.1 V2.8 V1.30 V1.0 V1.1 CopyMem routines 565×64kB L->L 1.85 1.85 1.85 1.35 1.31 147×64kB L->L+1 1.33 1.14 1.09 1.07 0.47 413×64kB L->E 2.21 2.21 2.21 2.23 1.29 147×64kB L->E+1 1.35 1.15 1.07 1.07 0.47 147×64kB L+1->L 1.35 1.15 0.51 0.47 0.45 382×64kB L+1->L+1 2.11 1.23 2.91 0.91 0.87 147×64kB L+1->E 1.33 1.15 0.81 0.79 0.47 501×64kB L+1->E+1 1.71 1.70 3.81 3.71 1.57 501×64kB E->L 1.71 1.71 1.75 1.59 1.57 147×64kB E->L+1 1.33 1.15 1.13 1.07 0.45 382×64kB E->E 2.11 1.23 2.13 0.91 0.89 147×64kB E->E+1 1.35 1.13 1.11 1.09 0.45 147×64kB E+1->L 1.33 1.15 0.51 0.45 0.47 413×64kB E+1->L+1 2.19 2.19 3.15 3.05 1.31 147×64kB E+1->E 1.33 1.15 0.81 0.79 0.47 564×64kB E+1->E+1 1.81 1.81 4.31 1.35 1.31 33900×1kB L->L 1.10 1.11 1.13 1.31 1.03 9400×1kB L->L+1 1.17 0.93 0.91 0.86 0.29 24000×1kB E->E 1.70 0.80 1.68 0.92 0.74 196000×128B L->L 1.02 0.73 1.06 1.04 0.75 155000×128B E->E 1.61 0.63 1.57 1.05 0.59 588000×19B L->L 0.83 0.60 1.46 0.74 0.50 622000×18B L->L 0.81 0.51 1.43 0.77 0.47 663000×17B L->L 0.75 0.70 1.47 0.73 0.52 956000×16B L->L 0.79 0.71 2.01 1.00 0.69 1060000×8B L->L 0.85 0.79 1.19 1.01 0.52 1430000×4B L->L 0.73 0.61 1.15 1.14 0.38 2190000×1B L->L 0.67 0.61 0.73 0.84 0.56 CopyMemQuick 565×64kB L->L 1.85 1.87 1.85 1.33 1.31 33900×1kB L->L 1.09 1.11 1.13 0.89 1.03 196000×128B L->L 0.99 0.71 1.07 0.81 0.71 956000×16B L->L 0.69 0.63 0.86 0.94 0.56 1060000×8B L->L 0.47 0.57 0.63 0.60 0.40 1430000×4B L->L 0.35 0.51 0.63 0.52 0.23 Test from PCM V1.0 Fast->Fast CopyMem 0.26 0.26 0.26 0.18 0.18 CopyMemQuick 0.26 0.26 0.26 0.20 0.18 Chip->Fast CopyMem 1.98 1.98 1.96 2.16 2.14 CopyMemQuick 1.98 1.98 1.98 2.16 2.14 Fast->Chip CopyMem 1.92 1.91 1.92 1.90 1.90 CopyMemQuick 1.92 1.92 1.92 1.90 1.88 Chip->Chip CopyMem 3.64 3.62 3.64 3.70 3.68 CopyMemQuick 3.62 3.62 3.62 3.70 3.68 History: 1.0 (12.Sep.1998) - First public version. 1.1 (15.Sep.1998) - V1.0 exits with a return code of 10 (=error), if it can't find a 68040 or 68060 or can't get the necessary memory. V1.1 exits, in this cases, with a return code of 20 (=fail). - Fixed a mistake in the readme. 1.1b (19.Sep.1998) (I didn't changed the Patch itself! It's the same as V1.1) - Added the Testresults of MCP V1.30 into the readme. - Added CMQ060beep and CMQ060beepCMQ (see above). ============================= Archive contents ============================= Original Packed Ratio Date Time Name -------- ------- ----- --------- -------- ------------- 444 318 28.3% 15-Sep-98 19:59:06 CMQ060 6865 2331 66.0% 19-Sep-98 12:27:38 CMQ060.readme 540 386 28.5% 19-Sep-98 11:35:02 +CMQ060beep 516 379 26.5% 19-Sep-98 11:35:02 +CMQ060beepCMQ 3609 823 77.1% 12-Sep-98 17:52:28 +CMQ060.include.s 4209 917 78.2% 19-Sep-98 11:33:20 +CMQ060.Includebeep.s 4220 949 77.5% 19-Sep-98 11:33:56 +CMQ060.IncludebeepCMQ.s 1880 678 63.9% 15-Sep-98 19:59:20 +CMQ060.s 2070 750 63.7% 19-Sep-98 00:37:58 +CMQ060beep.s 2072 751 63.7% 19-Sep-98 00:38:28 +CMQ060beepCMQ.s -------- ------- ----- --------- -------- 26425 8282 68.6% 21-Sep-98 22:05:24 10 files