Re: LZ: Emulator for MAC


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

Re: LZ: Emulator for MAC



On Fri, 4 Oct 1996, A.K.A. TheWiz wrote:


> <SNIP>
> > maybe some one was written a z80 emulator in asm for the MAC ?
> 
>   The speed of C really depends on the compiler.  On the Mac, all the 
> routines are in ROM anyway, so ASSEMBLER CAUSES NO SPEED INCREASE.
>   I can see a slew of uninformed opinions sprining up, so I should point
> out that any compiled language becomes assembler anyway, and the only thing
> that gets faster are device-access routines - which, as I said, are in ROM
> on the Mac; thus it's FASTER to use C.
>   (Apologies to anyone I've offended).




The fact is that all COMPILED code becomes assembly (or machine
langauge) but that has absolutely no bearing on speed.  It is
entirely possible to write very slow code im assembly and a lot
of it has been written.  One of the simplest ways to write slow
assembly is to use a compiler.


As for all the routines being in ROM, if the program is just an
outer loop that calls routines entirely in ROM and the loop is
a fairly simple one, then you're correct.  But if it's a
non-trivial program that's gonna do some real stuff, that part
of the code is the time critical code very often.  Thats the part
you can get the most benifit from optimizing.


A really good optimizing C compiler lets you do a really good
job of that if you really know your business.  It'll do a fair
to middling job if you're moderatly competent.  Assembly isn't
necessary to get good optimization for a lot of programs.


But if you're doing something that pushes the hardware to the
limit and you need more speed, a lot more, you can usually re-
code the critical routines in assembly and get a significant
increase.


The guys that wrote Doom bragged that it was 85% C++.  But
they did admit that that was only possible because the critical
routines were in assembly.


Barry


References: