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

Re: Asm or C (was: Re: New Web browser f



On Mon, 30 Mar 1998, Martin-Eric Racine wrote:

> Already, CAB has a few MagiC specific features, which partially
> alienates MiNT users, and it's likely things will move towards
> that direction in the future.

What parts of CAB needs MagiC? I have 2.6, and have never noticed any
restrictions under N.AES. Or are you talking about the modules that
needs that $%#/(%( wdialog?

> is only speculation, but I suspect the only reason C appears a
> more portable language is because people working on *X systems
> constantly play with GNU stuff whose sources are in C; after a
> while, one gets accustomed to C practices and completely drops
> any memory of previous ASM experience.

I for one has dropped assembly for most things, I only use it when I
have to patch vectors etc. where assembly is more suited. I prefer C
now, for three reasons:

1. Development-time.
2. Programming-tools.
3. The enormous amount of free C-libraries that's available.

Also, most applications spend a lot of time calling the OS, doing IO
etc., so there's not much speed to gain by using assembly instead of
C. A combination of C and assembly is IMHO the most effective way of
doing it, where only the most time-critical parts are written in
assembly.

There are more effective way of speeding up applications than hand
optimise assembly-code, e.g. very interactive applications (like a
web-browser) will be a lot more effective once you start running
things in paralell.

By coding everything in pure assembly you usually get the fastest
code, but you'll also spend a lot of time writing it. Using C (with
some inline assembly) you reduce development-time drastically while
sacrificing a small (insignificant) amount of speed.

Even programs like MagiC or NVDI, which is often said to be written in
"100% assembly", are written in C and assembly. Just run it through a
reassembler, you'll see plenty of compiler-generated code there.


/*
** Jo Even Skarstein    http://www.stud.ntnu.no/~josk/
**
**    beer - maria mckee - atari falcon - babylon 5
*/