| NEWS | | |  | | FORUMS | | |  | | FREEWARE | | |  | | ABOUT US | | |  | |
03-21-2003, 01:52 AM
|
#1 | | Junior Member
Join Date: Feb 2003 Location: Berlin, Germany
Posts: 22
| Efficiency of OS5 compilers Hi everybody,
I work in programming, not only but also for Palm applications. For the work I use Metrowerks CodeWarrior C/C++ version 5 (applications for Palm OS4). Now I will program for Palm OS5, I saw CodeWarrior arrived at version 9. But I konw from different other C/C++ compilers (i.e. GreenHills) that the code generation for ARM processors is not efficient.
Anybody has experiences at Palm OS5?
__________________
Thomas from Berlin, Germany
|
| |
03-21-2003, 02:04 PM
|
#2 | | Senior Member
Join Date: Sep 2002
Posts: 420
| What do you mean by "not efficent"? Are you talking about asm generation or are you talking about optimization?
__________________
Start by doing what's necessary, then what's possible and suddenly you are doing the impossible.
- St. Francis of Assisi
|
| |
03-24-2003, 02:10 AM
|
#3 | | Junior Member
Join Date: Feb 2003 Location: Berlin, Germany
Posts: 22
| Sorry for the late answer, office time is Mo-Fr  .
I mean the code generation itself by using the registers or better the resources of the ARM processor. This applies to both, the asm generation and the optimization.
I have seen development tools that were only adapted from other processors (i.e. INTEL) that have much lower registers than the ARM. So the company that provides the tool saves time, but the code generation is not efficient in many purposes. Optimization means using of the many general purpose registers of the ARM and this process results in the generation of asm code.
__________________
Thomas from Berlin, Germany
|
| |
03-24-2003, 12:05 PM
|
#4 | | Registered User
Join Date: Feb 2003
Posts: 1,424
| My experience/disclaimer:
I've only written a few small/simple Armlets, so efficient register allocation efficiency isn't really important.
----
There are two different ARM compilers available to you.
The one that comes with CodeWarrior Version 9 (not free) and the one that comes with the Palm SDK V5 (GNU, free)
I have had past experience with the GNU compiler which is pretty good [it is a generalized compiler with retargettable code generation].
I don't know about the code quality of the Metrowerks compiler, but the IDE integration makes it worth a look. |
| |
03-26-2003, 09:47 PM
|
#5 | | Senior Member
Join Date: Sep 2002
Posts: 420
| I don't really know how agressive a generic ARM compiler can be in register allocation. There are several registers that PalmOS requires to be left alone. In addition to that there may be registers that AMX uses. I think that loading the code in the code cache and the data in the data cache efficently and minimizing pipeline stalls would be much more useful and generally applicable. Its probably not likely that someone will hyper-optimize something like register allocation, but it is likely that someone would optimize the data and code so that cache lines are loaded optimally. In the same way, I'd be concerned if a compiler, given the code "for (i=10;i>0;i--) {}" generated:
MOV R0, #10
loop:
SUB R0, R0, 1
CMP R0, #0
BNE loop
rather than the more efficent
MOV R0, #10
loop:
SUBS R0, R0, 1
BNE loop
but I don't know that I would blame the compiler if the code was written "for (i=0;i<10;i++). As CliePet mentioned, the GNU compiler is a pretty good compiler, and if your _that_ concerned about speed in certain routines, you should probably consider coding them in an asm block.
__________________
Start by doing what's necessary, then what's possible and suddenly you are doing the impossible.
- St. Francis of Assisi
|
| | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 10:34 PM. | |