#ObjectOriented
23-Oct-95 23:24:08
Sb: #48445-#ObjectOriented
Fm: Ian J. Einman 74271,2766
To: Bart Van Bockstaele 100574,2352
>>assembler will produce the most efficient programs of them all.
Absolutely correct. I have been using assembler for years, in fact most of my
Amiga programs are in it. But the problem is that the larger projects get, the
more impossible it is to manage them. I can't even figure what the hell is
going on in AddPower anymore, and I am writing parts of it over again in C.
Managing several programs of even moderate size just gets to be impossible, and
then you come up against the comparisons.
AddPower written in assembly is about 18K in size. Wow, pretty small for all
it does. The same thing (with a much improved interface, and a few more
features) is about 100K in C. So I solved the problem by making the
preferences editors separate programs, so the master patch program that's
always in memory is only 20K again. The whole thing may be a lot bigger… but
the "efficiency" advantage of the assembly version is meaningless. The
preferences programs spend all their processing time WAITING for YOU to click
checkboxes. There is NO efficiency advantage to the (slightly) faster assembly
versions… because they are not CPU intensive, nor are most multitasking
programs that wait for input. And how relevant is 20K compared to 100K when
you have a hard drive 2000 times that size anyway?
Assembler code produces the most efficient programs. It is NOT the most
efficient programming language… the language that allows you to create the
most powerful software in the least time with the least bugs and the easiest to
go back and change later is the most efficient… and that is an OOP
programming language.
This little piece of advice comes from one of the few (1 percent?) of Amiga
programmers that actually writes software in assembly language, and I'd switch
over to C++ completely if I had a reasonably decent compiler. SAS/C++ is
slower than snot form a bad cold.