The 'Pawn Language' Forum

An embedded scripting language

 

Back To Forum Index
 
incrediball
Posted On 2009-08-05 19:38 -- Subject: Pawn compiler: optimizer

Hello, I was just wondering if there are any plans to improve the optimizer in the compiler. I have just started using Pawn and have ported some C code that compiles to 3924 bytes (ARM7 thumb mode generated by arm-elf-gcc) and the Pawn version compiles to approximately twice this size when using full optimization.

Note that I am very impressed with the product so far so I am certainly not complaining. The code size is however a concern for us and that's why I'm asking if there is a chance that this might be improved.

I have not experimented too much but here's some things that I noticed that gcc generally picks up on, e.g.

static test (num)
{
num = num + 1
return num
}

compiles to larger code than:

static test (num)
{
return num + 1
}

Also

x = test(x)

compiles to larger code than:

x++

I realise that the comparison with gcc is probably unfair because there's possibly about 100 times as many people working on it.

You Are On Page: 1/1 <<   <   1   >   >>




- BiTBOARD version 2.5 by the BiTSHiFTERS SDC -