How to optimize code on Symbian?

Login to reply to this topic.
Mon, 2005-04-25 03:27
Joined: 2005-04-25
Forum posts: 3
At present, I have code written in C language. I run it on Symbian. But the speed is too slow. How can I optimize it to make it rum faster? Thank you very much.  Smiley

Mon, 2005-04-25 09:25
Joined: 2004-07-28
Forum posts: 1379
How to optimize code on Symbian?
Simple, write it better Smiley.

C/C++ is fast enough for most things on Symbian, very few things actually need to be assembly optomized.

didster

Mon, 2005-04-25 10:34
Joined: 2004-06-06
Forum posts: 205
How to optimize code on Symbian?
if you use STDLIB your code will work slower.

Best regards,
Michal Laskowski

Tue, 2005-04-26 19:07
Joined: 2005-01-24
Forum posts: 27
How to optimize code on Symbian?
1.check exactly which functions work slow and optimize them

2.try to optimize algorythm first

3.don't use floating point math, use 32bit memory accesses, don't use div and limit using mul etc etc... dozens of optimization tricks come to my mind, it depends what you're doing

With best regards,

Mirek Czerwiński

Tue, 2005-04-26 22:00
Joined: 2004-06-06
Forum posts: 205
How to optimize code on Symbian?
Quote from: MirekCz
1.check exactly which functions work slow and optimize them

2.try to optimize algorythm first

3.don't use floating point math, use 32bit memory accesses, don't use div and limit using mul etc etc... dozens of optimization tricks come to my mind, it depends what you're doing

Yep i agree. There are many things that can speed up your code.
Some are difficult some are realy easy like for ex. doing for-loops backward.
It realy depends what app your doing.
Check tutorials bout C++ optimization, try some ARM assembly.[/b]

Best regards,
Michal Laskowski

Tue, 2005-06-21 00:20
Guest (not verified)
Forum posts: 2018
Re: How to optimize code on Symbian?
What do you mean by doing a for loop backwards? How does this increase efficiency?
Tue, 2005-06-21 11:35
Joined: 2004-06-06
Forum posts: 205
Re: How to optimize code on Symbian?
counting from 0 to 255 looks like:
Code:
MOV   R1, #0
.myloop
ADD   R1, R1, #1
CMP   R1, #255
BNE   myloop

and counting from 255 to 0 looks like
Code:
MOV   R1, #255
.myloop
SUBS  R1, R1, #1
BNE    myloop

check this site its good source for someone new with ARM.

Best regards,
Michal Laskowski

  • Login to reply to this topic.