Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!utrcu1!kortink From: kortink@utrcu1.UUCP (Kortink John) Newsgroups: comp.sys.acorn Subject: C versus ARM Message-ID: <806@utrcu1.UUCP> Date: 23 Feb 91 01:08:51 GMT Reply-To: kortink@utrcu1.UUCP (Kortink John) Organization: Utwente, Enschede Lines: 50 In article <1991Feb18.080958.16120@watdragon.waterloo.edu> ccplumb@rose.uwaterloo.ca (Colin Plumb) writes : >kortink@utrcu1.UUCP (Kortink John) wrote: >>> [...] 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. > >No; the ratio quoted (C is 17% slower) is typical of current compiler >technology on non-disgusting machines (the Intel i860 is disgusting; >the ARM is not). If you can regularly achieve twice the speed of your >compiler's output, then I suggest that your compiler is not very good. > >Some cases can still benefit from human sneakiness, but these are >usually small. The ARM is so wonderfully simple, it's hard to hide a >possibility from a compiler. >[...] True, still there is a borderline somewhere along the path to the 'perfect' code which a smart compiler can't pass, while a human can. It is the problem content and the programmer's ARM skills that determine how much further the human will go in the end. If you need a proof of the 1:2 ratio, look at Impression versus Acorn DTP. If you need further proof, try writing the machinecode for Translator in C. I gradually get the impression (no fun intended) that 'C-only' programmers don't really care about optimization, because they *think* the ratio is 10:12 (so why bother?). >And in some cases (see Fred Brooks' The Mythical Man-Month), C (or other >compiled language) can be faster, not because it does X faster than an >assembler version, but becuase finishing it sooner let the C programmer >notice that X could be replaced with Y, which is less work. >[...] Thats just an example of bad thinking. Look before you leap. John Kortink ----------------------------------------------------------------------------- Student of Informatics at the University of Twente, The Netherlands MAIL : kortink@utrcu1.uucp DISCLAIMER : you know .... "If language were liquid it would be rushing in Instead here we are Suzanne Vega (Solitude standing) in a silence more eloquent than any word could ever be" ------------------------------------------------------------------------------