Re: Version after Version




"ProfitMaxTrading.com" <nospam@xxxxxxxxxx> wrote in message
news:dtf9f.4687$LR1.3628@xxxxxxxxxxxxx

> Knowing that you like Visual Basic, I was surprised about your comments
> on 'C'. ASM I can see as producing more efficient code. That's a no
> brainer since it is so close to the machine level. But Visual Basic over
> 'c' in efficiency? That throws me for a loop.

ASM only has the potential to produce more efficient code. Code efficiency
using it is very dependant on the coder. The dependance on coder knowledge
and practice is greatly reduced when one has an optimizing compiler
contributing to the final code. So, IMO, its a myth that ASM is more
efficient. (Although it may have been true 25 - 30 years ago.)

One reason a language such as VB can produce more efficient code than C is
because coders are more constrained and the compiler has more choice in
implementation. A C coder, for example, may declare a longInt array such
that it doesn't start on a word boundry, making access particularly
inefficient. AFAIK, a VB programmer doesn't have this option, the compiler
makes the decision. I'm not suggesting that VB, itself, produces more
efficient code than C. What I am saying is that we should no longer believe
that the closer to machine language we go the more efficient a program will
be.

Undoubtably there are coders out there who can produce more efficient ASM
code than any current compiler can produce. However, they have difficulty
doing so consistently, especially in very large projects. As a rule of
thumb when measured across an entire application, current optimizing
compilers will always produce code that is no worse than what a good ASM
coder can produce. And, they will do so in a fraction of the time.


.



Relevant Pages

  • Re: Version after Version
    ... ASM and 'C' overall faster in execution than in VB? ... ASM I can see as producing more efficient code. ... > using it is very dependant on the coder. ... > and practice is greatly reduced when one has an optimizing compiler ...
    (alt.comp.lang.borland-delphi)
  • Re: GCC front-end for FORTH?
    ... ends to generate efficient code for Forth would be hard. ... The return stack is particularly easy, because it has to be balanced ... you need not use a calling convention for most ... doing it in a compiler is that the register allocation will be worse ...
    (comp.lang.forth)
  • Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management
    ... Static typing information also lets the compiler generate ... > the process of generating efficient code for the compiler ... Given a static type declaration, a compiler can generate efficient code ...
    (comp.object)
  • Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management
    ... Static typing information also lets the compiler generate ... > the process of generating efficient code for the compiler ... Given a static type declaration, a compiler can generate efficient code ...
    (comp.programming)
  • Re: PL/S ??
    ... and doesn't generate very efficient code, ... C compiler has, for many years, had an offering called "System Programmer ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)