[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] C coding rules concerning to performance?



At Fri, 11 Mar 2005 10:57:01 +0100,
Brettschneider Falk wrote:
> 
> Hi,
> While starting to write a C program for ucLinux on the microblaze I wonder
> which are the dos and don'ts in those sources. E.g. I see division is quite
> slow (34 cycles)... and for instance some say to increment counters in loops
> is more expensive than to decrement ... dynamic allocation may be dog-slow
> on some platforms ... I mean all such rules like this.

it all "depends".

if you _really_ want to know what's going on, write small C programs
and compile them to assembly.

ie. a division such as 1024/2 in C level isn't really a division in
assembly level. dynamic allocation takes much more cycle than static
allocaion, but it depends it's dog slow or not for you.

my 2 cents
--
         yashi
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/