28 December 2014, 17:22 | #1 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
CopyMem Quick & Small released!
CopyMem Quick & Small v1.6
Parts of patch install code by Dirk Busse 1999 Enhanced patch code by SpeedGeek 2015 INTRODUCTION: CMQ&S is a much smaller Copymem + Copymemquick patch. It's main goal is to give a good speed increase without all the bloated code found in the other CMQ patches. It does not attempt to be the fastest CMQ patch, but at 92 bytes for the current version, it's almost certainly one of the fastest in it's class. FEATURES: - Installs one of the smallest CMQ patches for 68020+ Amigas - Safely exits if the patch is already installed (e.g. a good patch program should really avoid patching itself) REQUIREMENTS: - Amiga with 68020+ NOTES: Most other CMQ patches got bloated because their authors wanted their patch to be faster than any previously released patch. This means even bigger "unrolled" loops, redundant testing for small & medium size copies and extra code to handle misaligned transfers. Unfortunately, Testit from COPMQR28 makes a disproportional number of these "Worst Case" tests and other coders have fallen into the trap. Motorola optimized it's 68K CPUs to improve average case performance at the expense of worst case performance. Need I say any more? Last edited by SpeedGeek; 04 July 2020 at 14:36. |
29 December 2014, 14:26 | #2 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,310
|
Some TestIt results for the fun. Attached results for various copymem paches if you care. If matthey read this you might have a look at "copymem_test_CopyMem040.txt". You might can explain the last result because it differs much compared to CopyMem060:
Code:
Copying 1 bytes 2190000 times (long -> long offset) Old CopyMem : 0.88 secs New CopyMem : 0.82 secs (- 5.7%) SpeedGeek stuff: Code:
10. System:C> CMQ&S040 10. System:C> CopyMemQuicker CopyMemQuicker 2.8 (12.6.94) Copyright © 1992 Arthur Hagen. 10. System:C> TestIt This test will compare the old CopyMem/CopyMemQuick routines with the new ones you have installed. A great variety of tests will be run, and this might take some time, especially if your system has a slow processor. Initiating test (please be patient...) Copying 65536 bytes 565 times (long -> long offset) Old CopyMem : 2.03 secs New CopyMem : 2.07 secs (+ 2.0%) Old CopyMemQuick: 2.03 secs New CopyMemQuick: 2.04 secs (+ 0.5%) Copying 65536 bytes 147 times (long -> long+1 offset) Old CopyMem : 0.60 secs New CopyMem : 0.79 secs (+31.7%) Copying 65536 bytes 413 times (long -> even offset) Old CopyMem : 1.68 secs New CopyMem : 1.47 secs (-12.5%) Copying 65536 bytes 147 times (long -> even+1 offset) Old CopyMem : 0.60 secs New CopyMem : 0.81 secs (+35.0%) Copying 65536 bytes 147 times (long+1 -> long offset) Old CopyMem : 0.54 secs New CopyMem : 0.81 secs (+50.0%) Copying 65536 bytes 382 times (long+1 -> long+1 offset) Old CopyMem : 1.42 secs New CopyMem : 1.42 secs (+ 0.0%) Copying 65536 bytes 147 times (long+1 -> even offset) Old CopyMem : 0.54 secs New CopyMem : 0.79 secs (+46.3%) Copying 65536 bytes 501 times (long+1 -> even+1 offset) Old CopyMem : 1.87 secs New CopyMem : 1.94 secs (+ 3.7%) Copying 65536 bytes 501 times (even -> long offset) Old CopyMem : 1.84 secs New CopyMem : 2.03 secs (+ 9.8%) Copying 65536 bytes 147 times (even -> long+1 offset) Old CopyMem : 0.54 secs New CopyMem : 0.81 secs (+48.1%) Copying 65536 bytes 382 times (even -> even offset) Old CopyMem : 1.42 secs New CopyMem : 1.42 secs (+ 0.0%) Copying 65536 bytes 147 times (even -> even+1 offset) Old CopyMem : 0.54 secs New CopyMem : 0.79 secs (+44.4%) Copying 65536 bytes 147 times (even+1 -> long offset) Old CopyMem : 0.54 secs New CopyMem : 0.81 secs (+50.0%) Copying 65536 bytes 413 times (even+1 -> long+1 offset) Old CopyMem : 1.54 secs New CopyMem : 1.62 secs (+ 4.5%) Copying 65536 bytes 147 times (even+1 -> even offset) Old CopyMem : 0.54 secs New CopyMem : 0.81 secs (+48.1%) Copying 65536 bytes 564 times (even+1 -> even+1 offset) Old CopyMem : 2.10 secs New CopyMem : 2.10 secs (+ 0.0%) Copying 1024 bytes 33900 times (long -> long offset) Old CopyMem : 0.54 secs New CopyMem : 0.70 secs (+29.6%) Old CopyMemQuick: 0.53 secs New CopyMemQuick: 0.69 secs (+30.2%) Copying 1024 bytes 9400 times (long -> long+1 offset) Old CopyMem : 0.21 secs New CopyMem : 0.52 secs (+142.8%) Copying 1024 bytes 24000 times (even -> even offset) Old CopyMem : 0.62 secs New CopyMem : 0.50 secs (-17.7%) Copying 128 bytes 196000 times (long -> long offset) Old CopyMem : 0.50 secs New CopyMem : 0.98 secs (+94.0%) Old CopyMemQuick: 0.45 secs New CopyMemQuick: 0.86 secs (+91.1%) Copying 128 bytes 155000 times (even -> even offset) Old CopyMem : 0.59 secs New CopyMem : 0.82 secs (+37.3%) Copying 19 bytes 588000 times (long -> long offset) Old CopyMem : 0.87 secs New CopyMem : 0.93 secs (+ 5.7%) Copying 18 bytes 622000 times (long -> long offset) Old CopyMem : 0.79 secs New CopyMem : 0.95 secs (+19.0%) Copying 17 bytes 663000 times (long -> long offset) Old CopyMem : 0.94 secs New CopyMem : 0.99 secs (+ 5.3%) Copying 16 bytes 956000 times (long -> long offset) Old CopyMem : 1.12 secs New CopyMem : 1.44 secs (+27.7%) Old CopyMemQuick: 0.86 secs New CopyMemQuick: 0.86 secs (- 0.0%) Copying 8 bytes 1060000 times (long -> long offset) Old CopyMem : 0.98 secs New CopyMem : 1.33 secs (+34.7%) Old CopyMemQuick: 0.69 secs New CopyMemQuick: 0.69 secs (+ 0.0%) Copying 4 bytes 1430000 times (long -> long offset) Old CopyMem : 1.11 secs New CopyMem : 1.07 secs (- 2.7%) Old CopyMemQuick: 0.71 secs New CopyMemQuick: 0.75 secs (+ 4.2%) Copying 1 bytes 2190000 times (long -> long offset) Old CopyMem : 0.77 secs New CopyMem : 0.82 secs (+ 6.5%) Total timing: ------------- Old routines : 32.81 secs New routines : 37.60 secs Total slowdown : 14.60 % |
29 December 2014, 17:06 | #3 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
Code:
See CMQ&B040 thread for MOVE16 Testit results. Last edited by SpeedGeek; 04 July 2020 at 14:40. |
31 December 2014, 03:23 | #4 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
** NEWS UPDATE **
CMQ&S040 v1.6 released v1.6 minor change - source address compare code misqualified Move16 on 8 byte offset (This is fixed now but the 4 byte offset still doesn't work for some reason) |
31 December 2014, 18:24 | #5 |
Registered User
Join Date: Aug 2014
Location: Gdynia/Poland
Posts: 162
|
Your patch needs to be run before setpatch or no matter ? (I am using 68060.library and mmu.library by Tomas Richter)
|
31 December 2014, 19:49 | #6 | |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,310
|
From txt file:
Quote:
|
|
02 January 2015, 17:06 | #7 | |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
Quote:
Sometimes, it's necessary to run another patch before Setpatch (e.g. you have non-autoconfig Fast RAM to be added, or you use vbak2091 which needs to be run before any NSD config stuff). But none of the above apply to CMQ&S so the recommended use is the preferred use. |
|
06 January 2015, 16:14 | #9 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
Hi Retrofan,
CMQ&S is an alternative CMQ patch. Whether or not it would be a good substitute for any other patch is a matter of opinion and really depends on what your looking for. |
06 January 2015, 21:42 | #10 |
Ruler of the Universe
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,195
|
Thanks a lot SpeedGeek. Yes, I've been reading and it seems there isn't a complete unanimity about it's convenience yet and also the benefits can depend on the hardware.
Thanks anyway for working on it. |
12 January 2015, 00:26 | #11 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
** 2ND NEWS UPDATE **
CMQ&S v1.6 released v1.6 minor change - fixed install code which could (but seldom ever did) trash a few bytes of memory past the end of the patch Last edited by SpeedGeek; 05 July 2020 at 13:42. |
22 January 2015, 16:33 | #12 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
** 3RD NEWS UPDATE **
Deleted post. Last edited by SpeedGeek; 05 July 2020 at 13:42. |
04 July 2020, 14:49 | #13 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
** 4TH NEWS UPDATE **
CMQ&S040 has been removed and all related posts deleted. CMQ&S was originally developed as "Proof of Concept" code for low memory systems. Since 040+ systems typically have much more memory than 020-030 systems it's really not practical for such systems. CMQ&B040 should be more practical in this case. Here is the link: http://eab.abime.net/showthread.php?t=76777 Last edited by SpeedGeek; 04 July 2020 at 14:59. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copymem Quick & Big Released! | SpeedGeek | Coders. System | 23 | 08 January 2024 00:06 |
Quick help with keyboard | VresiBerba | support.Hardware | 12 | 02 October 2019 11:17 |
A nice quick small random numbers routine? | Photon | Coders. General | 2 | 20 December 2004 21:56 |
A Quick Question | Reps | Amiga scene | 5 | 27 October 2003 10:42 |
Just a quick Question ! | RetroMan | project.SPS (was CAPS) | 4 | 08 April 2003 11:00 |
|
|