mpfj
Joined: 09 Sep 2003 Posts: 95 Location: UK
|
Code size 3v249 vs. 3v243 / 3v246 |
Posted: Fri Mar 24, 2006 1:37 pm |
|
|
I've just got the latest 3v249 compiler, recompiled my current project and was amazed to see a fairly impressive code size reduction, as follows:-
Code: | CCS PCH C Compiler, Version 3.243, 32117 24-Mar-06 19:13
Filename: main.lst
ROM used: 58324 bytes (45%)
Largest free fragment is 64704
RAM used: 2170 (57%) at main() level
2477 (65%) worst case
Stack: 18 worst case (15 in main + 3 for interrupts)
|
Code: | CCS PCH C Compiler, Version 3.246, 266 24-Mar-06 19:25
Filename: main.lst
ROM used: 58380 bytes (45%)
Largest free fragment is 64704
RAM used: 2170 (57%) at main() level
2477 (65%) worst case
Stack: 18 worst case (15 in main + 3 for interrupts)
|
Code: | CCS PCH C Compiler, Version 3.249, 266 24-Mar-06 19:15
Filename: main.lst
ROM used: 48928 bytes (38%)
Largest free fragment is 64704
RAM used: 2170 (57%) at main() level
2477 (65%) worst case
Stack: 18 worst case (15 in main + 3 for interrupts)
|
That's nearly a 20% code reduction
Most of the changes seem to be simple checks like this from 3v246 ...
Code: | .................... // if we're in one shot mode ...
.................... if (barcode.one_shot) {
0D3AE: MOVLB 2
0D3B0: BTFSC x4C.1
0D3B2: BRA D3BA
0D3B4: MOVLB 0
0D3B6: GOTO D3C4
0D3BA: MOVLB 0
|
... changes to this in 3v249 ...
Code: | .................... // if we're in one shot mode ...
.................... if (barcode.one_shot) {
0AF3C: BTFSS x4C.1
0AF3E: BRA AF44
|
That's a fairly fundamental piece of code, so if anyone's running out of space, it might be worth you trying 3v249. |
|