methods of optimizing C code?
hi, i'm the developer of PSPSeq and am looking to improve the overall performance of the program. as a start, i want to make sure that i am using the best switches for g++ (FYI my code is almost exclusivly C, i just use C++ for simplicity sake and a bit of overloading). anyways, this is what i'm using right now:
-g -c -Os -finline-functions-called-once -finline-functions -floop-optimize2 -fsingle-precision-constant
any other ideas? something i'm missing?
once the compiler optimizations are done i'll move on the C optimizations. are there any pragmas that can be used for things like branch prediction? other fun tricks to play to improve performance in that domain?
lastly i might suck it up and try some asm optimization. i've seen some of the MIPS documentation but i'd be much happier if there was a good tutorial. has anyone found something like this out there? doesn't have to be PSP specific, as long as its for the MIPS core.
oh one other thing - i've noticed that when i try and malloc and access large buffers (a few hundred kb) that performance really slows down. any ideas as to why that's happening/if it's expected/what i can do about it?