[Coco] Need some advice

Greg glaw at live.com
Sun May 22 00:22:49 EDT 2016

If I was one of those persons on Delphi that said something like this, 
maybe one day I'll get the taste of my foot out of my mouth. :-)

I'm not surprised in the least that hand-craft assembly can be 
significantly faster than similar C code. The compiler makes it easier 
to develop code, but the optimizations applied were very limited and 
somewhat crude in the '80s. C compilers of the day commonly supported 
embedded assembly code specifically so that portions of the code could 
be optimized by a human. It should have been common knowledge by 
everyone that the C compilers of the day would never match human 
optimized assembly code.

I think the C/C++ compilers today have significantly better optimizers, 
but I'm not quite willing to bet a nickle that machine-generated C code 
can always match human-generated assembly. On the other hand, I'm not 
quite so sure I could create assembly code on a modern processor any 

On 5/21/2016 11:10:12 PM, "Dave Philipsen" <dave at davebiz.com> wrote:

>When I wrote Supercomm over 25 years ago the primary impetus was to 
>have an OS9 terminal program that could download via xmodem and ymodem 
>significantly faster than a popular program that was then available 
>which was written in C.  Certain persons on Delphi and Compuserve 
>chided me and said that a communications program written in C would be 
>every bit as fast as one written in assembler.  Back then time was 
>money.  Many BBSs were long distance calls and we paid by the minute.  
>So, I did some tests.  I wrote what eventually became Supercomm and 
>compared it against the program which was written in C.  At the time, I 
>realized speed improvements somewhere in the neighborhood of 10%, as I 
>recall, when downloading files from the same BBS with the same modem.  
>I concluded that part of the reason  was more optimized code from 
>writing in assembler as well as calculating checksum on the fly instead 
>at the end of each received block.  With the advent of faster 
>processors and better C compilers I'm sure that the gap between 
>assemblers and C compilers has narrowed.
>Dave Philipsen

More information about the Coco mailing list