Compiler tricks to improve speed

Hello All,

I am using C51 and my code runs on Infineon controller. For company policy reason I am not revealing the exact controller and sorry about that. I would like to improve the speed. I was using the large memory model for this compiler and now I use small memory model. This has improved speed a lot. I would like to know if there are some more such settings for this compiler to improve the speed. Thank you in advance.

Best regards, Shailendra

Reply to
SSM
Loading thread data ...

Sure.

1) throw out floating point 2) use smaller datatypes, eg byte instead of integer where appropriate

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

Using statics may make it faster.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

# Read the assembler output, and start to learn the code the compiler creates for given constructs. ie understand your tools # Focus on the code blocks, where you know speed matters. # Use in-line assembler, but only as a last resort. # Increase the CPU clock speed, or move to a newer infineon model, like the 868 or 888 variants ?

-jg

Reply to
Jim Granville

you may use intrinsics which map c statements to asm instructions this can improve speed in modules which r cycle instensive e.g. most processor haver leading count zero instruction ( there will be a corresponding multi nstructiont for the same ) u can use intrinsic to replace this code . this will give u codesize as well as speed

Reply to
kapil

read the section of the manual on making the code smaller and faster.

Reply to
Neil

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.