Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!sdd.hp.com!spool.mu.edu!uunet!mcsun!ukc!slxsys!ibmpcug!mantis!mathew From: mathew@mantis.co.uk (mathew) Newsgroups: comp.sys.acorn Subject: Re: C,Pascal & BASIC Message-ID: <0wwkX9w163w@mantis.co.uk> Date: 18 Feb 91 19:20:44 GMT References: <803@utrcu1.UUCP> Organization: Mantis Consultants, Cambridge. UK. Lines: 36 kortink@utrcu1.UUCP (Kortink John) writes: > > The great advantage of C is it's *lack* of built in rubbish. All the i/o > > etc. is in standard libraries, reducing the load image size of programs > > which don't need (or want) a pile of utility functions linked in. > > This is a surprising statement. The all-famous 'Hello world' program, when > compiled in C, grows out of all proportions because so many libary functions > are not used at all. What's your definition of *rubbish* ? Hint: Get a good C compiler. If you write "Hello World" using then yes, you get lots of junk. The point is that it's all OPTIONAL junk, which you asked for, and a smart compiler and linker can even cut out most of that. You can write "Hello world" programs in C using system libraries and pure native OS calls; I know because I've done it, and the result is a program not much bigger than the assembly language equivalent. > > [...] compiled BASIC is only a tenth the speed of efficiently written > > compiled C, and 1/12 that of raw ARM code. > > Utter nonsense. Good, optimized ARM code is at least twice as fast and > short as any C code. Hint: Get a good C compiler. A good optimizing compiler can produce better assembly language code than the vast majority of assembler programmers. If you're David Braben, maybe you can write code which is twice as good as compiled C; but for most people, 1.2 times as good is about right. You should also bear in mind that the productivity of C programmers (in terms of working object code produced) is about ten times that of assembly language programmers. mathew.