View Single Post
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#25
Originally Posted by pycage View Post
Speed is not a matter of choosing a certain language, speed is a matter of choosing the right algorithms.

Apart from that, writing whole programs in assembler is not recommended on modern operating systems because you would have to program against a C-level interface. But nothing (except for portability) speaks against writing small functions (e.g. for image processing) in assembler. But don't get the illusion that asm is faster than C. Most C-compilers nowadays produce optimized asm code that is faster than anything you would write yourself in asm.
But unfortunately gcc for arm is not one of these compilers. It does rather poor job at instructions scheduling and registers allocation. Leaf functions containing loops and nontrivial branching logic can be hand optimized quite well using assembly with rather good results. Of course optimizing these functions only makes sense if they are performance hotspots.