|
Forum Index : Microcontroller and PC projects : CMM2 - speed optimisation notes
| Author | Message | ||||
| jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi all, while working on emulator, where I need maximum speed, I found until now fow points/ideas, which could be usable by others too (Peter knows it, but I didn't find it anywhere written)... 1. Hex constant are faster than decimal, with exception of negative numbers. So p = p + &h1 is faster than p = p + 1 (Also spaces make it a little bit slower, but not so much) 2. CSUBs are called faster when defined without parameters also in case they are defined (and needed) in C-file CSUB action ... END CSUB Then called as action par1, par2 3. Logical functions are fast, mainly in combination with hex constants 4. Computed propertities faster then IFs zero = (x = &h0)<<&h1 is faster than IF x=0 THEN zero=2 ELSE zero=0 5. BYTE access into memory reserved as array is faster with help if LONGSTRINGs than PEEKs/POKEs, but marginally and not so cozy Not so many, but maybe good start for quick guide... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |