gcc and assembly
John Love-Jensen
eljay@adobe.com
Fri Apr 5 17:31:00 GMT 2002
Hi Stephen,
Your question is off topic, but I'll give you my $0.02.
I gave up writing in assembly language around 1988 ... I thought that I
could write more efficient code than my C compiler.
After spending two days hand tweaking a blitter algorithm, I implemented
the same thing in C -- just to double check my work and count cycles to
see how superior my lovingly hand coded assembly was over crufty, cookie
cutter C (with all optimizations enabled).
Well, knock me down with a feather -- the compiler's code was x2.3
faster than my code. That was the last assembly I ever did.
Now, I'm not ruling out the possibility that I'm just lame assembly
programmer. But, until then, I had fancied myself competent, until the
compiler humbled me.
Sincerely,
John "Eljay" Love-Jensen
Adobe Systems
Stephen Turner wrote:
> i have a stupid question. when a person programs in
> asm or machine code they make a smaller and faster
> program cause they can optimize it better than an
> assembler, but cant an assembler be made better, maybe
> even close to a humans quality in programing and
> optimization? i was just curious, seen a fast machine
> coded distro on a disk a while back and wondered why
> compiling your own code optimized wasnt as fast..
More information about the Gcc-help
mailing list