well, *coughs*, I've been able to optimize some code fragment using special techniques to about 6x the gcc-O3 speed... does that count? I did use SSE, and the compiler didn't, does that matter? (speed increase was from 921 seconds using gcc code to 172.2 seconds with my own, alpha blending 10000 frames at 1024*768 with a constant factor @ duron 1200).Tim Robinson wrote: Nobody's thought of any advantages .
Assembly code can be faster than C if you are an expert.
I have never seen anyone who can write better assembly code than a C compiler, except maybe for 5 lines at a time. Certainly a whole OS written in asm can expect to be worse-optimised than one written in C or C++.
As for the topic again, I'd advise you to use both. Each has their advantages (and disadvantages), and the only way you are going to get the best there is, is by using both. That means, C is useful for large programs, hard constructs and regular programming flows. ASM is useful for everything, but it's hard, tedious to get fast and lots of debugging. So, simple solution, write it in C as much as you can, convert the parts that actually cost a lot of time to assembly, and have a near-assembly speed result with a lot less development worries and annoyances.
That said, stretch the concept to other languages as well. You don't need C for a word processor do you?