A89: Re: Game Programming -- Pure Assembly vs. TI-GCC?


[Prev][Next][Index][Thread]

A89: Re: Game Programming -- Pure Assembly vs. TI-GCC?




> So my question is this: for a task such as this, how many 
> times faster do you estimate it would run if programmed in
> pure ASM, as opposed to C?

TIGCC internally first translates C into ASM, then assembles
it. So, in C may be even faster than program produced in 
assembler by some not so good ASM coder. TIGCC generates
quite good ASM code but not ideal. My experience is that
C programs is tipically 15-30% slower that ASM programs
created by tipical ASM coder. But, I don't believe that
even the best ASM coder will made a program which will be
more than twice faster than in C (of course, I talk
about C programs written by _good_ C coders too).

> Also, can all the libraries be used the same way in C as
> they are in ASM?

You ask about DoorsOS libraries etc? Usage of routines
which use stack for passing parameters is straightforward.
Routines which use registers for passing parameters needs
small interface in asm for addapting calling convention
to C. By the way, there is a special collection of
routines (written by me) called tigcclib with more than
300 routines for usage with tigcc. Current version is 1.1,
but release 1.5 will be ready in next 10-15 days (which
will include floating point support, and probably, full
interface code with Doors libraries).

Zeljko Juric

  This is the very first time I've ever worked with any ASM, BTW (TI
> or otherwise) ;P
> 
> 
> BeaT (Seth Peelle)
> beat@drigon.com
> http://www.drigon.com/~beat


Follow-Ups: