Linked by Thom Holwerda on Sun 8th Jul 2012 22:54 UTC
Thread beginning with comment 526076
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Comment by ilovebeer
by DeepThought on Tue 10th Jul 2012 02:08
in reply to "RE[2]: Comment by ilovebeer"
RE[4]: Comment by ilovebeer
by Alfman on Tue 10th Jul 2012 02:58
in reply to "RE[3]: Comment by ilovebeer"
DeepThought,
Yea, GCC often produces subpar code in my experience. Depending on how tight a loop needs to be, hand-crafted assembly can bring decent gains. Sometimes we can get away swapping in intrinsics, other times GCC just refuses to output good code.
ICC is supposed to be an excellent code optimiser though.
It's all relative though, computers have gotten so fast we're usually waiting on I/O anyway.





Member since:
2005-07-06
... but can be out-performed on many machines by a decent assembler programmer. "
As CPUs became more orthogonal, I bet the advantage eroded pretty quickly. Compilers can just keep track of more information to make better decisions on optimizations, such as efficient register scheduling.
And it's poor software engineering to dive straight into assembly without finding the bottlenecks first. Even small micro-controllers like PIC are better programmed in C first with a directed migration to assembly based on performance requirements.
Except for the smallest of embedded systems, C is perfectly viable using something like Contiki ( http://www.contiki-os.org/ ).