[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guidelines? (And a quick note about the website)
Christian Reiniger wrote:
> The Greene Family wrote:
> >One more thing i should ask is about the use of assembly, i'm a fairly
> >experienced assembler coder, but i am anything but adept at the AT&T syntax
> >(to be straight forward: i've never been able to get the blasted syntax to
> >work!) so would using NASM be a bad thing or what?
> NASM is fine, but you should avoid assembly if possible, because it's very
> hard to port. And for most things the small speed gain just isn't worth it.
You could do it like in Crystal Space. Keep all routines in C so you always
have the C fallback if needed but provide assembly versions of time critical
C functions which can optionally be used. Using this technique Crystal Space
can run on Linux, Solaris, IRIS/SGI, FreeBSD, BeOS, OS/2, Windows, DOS,
NextStep, OpenStep, Rhapsody, Macintosh, and Amiga while still using
maximum optimized assembly on systems that support it.
Of course the disadvantage of this is that you need to maintain two versions
of that particular routine. But you should only do this for routines that absolutely
need this (like the inner texture mapping loop) and that are not very likely
to change (so at the end stage of the project).
And NASM is a good choice for assembler as it is portable on Intel platforms.
Jorrit.Tyberghein@uz.kuleuven.ac.be, University Hospitals KU Leuven BELGIUM
"You can't trample infidels when you're a tortoise. I mean, all you could
do is give them a meaningful look."
-- (Terry Pratchett, Small Gods)