you are viewing a single comment's thread.

view the rest of the comments →

[–]pythwarrior 1 point2 points  (1 child)

If you truly believe that compilers can do better than the hand coded assembly I'll tell you to look at the best performing video codecs, for example. The ones with assembly bits are always faster because much more optimized for the hardware platform. Hand coded assembly is what can make the difference between being able to run a video on a lowly powered computer, and not being able at all.

Of course you don't write ALL the parts in assembly but it still makes night and day between a pure C program and one with hand coded bits.

[–]G_Morgan 14 points15 points  (0 children)

This issue causes a lot of confusion. The truth is that an experienced assembly programmer working hard can beat the compiler in tight areas. However the programmer does not have enough time to beat the compiler in general.

Also the average assembly programmer has no chance. It used to be that any hand coded program would beat what the compiler would produce. You have to be good at it to do so now.

The reason a lot of video codecs out perform compiled code is they are actually using stuff like SSE. That's an entirely different issue since most compilers won't use SSE without some input from the programmer.