[ale] why not asm

Stuffed Crust pizza at shaftnet.org
Thu Dec 20 00:31:26 EST 2001


On Wed, Dec 19, 2001 at 11:54:23PM -0500, Vernard Martin wrote:
> compiler doing a lot of work for you. Not to mention things like
> libraries and things like that. However, the tradeoff is usually that
> code written in native assembly is much faster. But the tradeoff between
> speed and ease of coding is well worth it in most cases.

No.. I'd argue that unless you REALLY know what you're doing, any code
you write in asm is going to be slower than what your average optimizing
C compiler will spit out.   For any non-trivial task, that is. This is
especially true for RISC architechures.

And this is even more true when you factor in the time it'll take you to
write it.

The usual 90/10 rule applies.  Write the whole thing in a higher-level
language, then find out what 10% takes 90% of the execution time.  Then
optimize that, using asm if absolutely necessary -- You'll get far more
of a performance boost by optimizing the algorithm, not the underlying
machine code, which is a last resort type of thing.

 - Pizza
-- 
Solomon Peachy                                    pizzaATfucktheusers.org
I ain't broke, but I'm badly bent.                           ICQ# 1318344
Patience comes to those who wait.
    ...It's not "Beanbag Love", it's a "Transanimate Relationship"...

 PGP signature




More information about the Ale mailing list