View Single Post
  #43  
Old February 26th 19, 01:02 PM posted to alt.windows7.general,comp.lang.c,comp.programming,alt.comp.os.windows-10
nospam
external usenet poster
 
Posts: 4,718
Default C is not a low level language

In article , David Brown
wrote:

There are almost no programming fields that require hand-written
assembly these days. Even if you are writing a compiler, or low-level
libraries for a compiler, you are unlikely to need more than small
sections or snippets of assembly. There are still occasions where
assembly will give you noticeably more efficient results than a
high-level language - but very, very few where the difference is big
enough to warrant using assembly. Generally, if you think assembly is
the best choice then you have picked an inappropriate processor,
inappropriate tools, or an inappropriate programmer.


exactly

I think it is good for programmers to have some experience of assembly,
and to have understanding of it - it helps give a better appreciation of
how things work underneath, and can lead to the programmer writing
better high-level code (especially on smaller systems). But that is
different from actually writing assembly for real work.


what matters the most are good algorithms, and knowing assembly does
not help with that.


That is often the case - but certainly not always. Good algorithms are
important when "n" is big - but "n" is usually small. For a small
enough size, bubblesort will beat heapsort. Good algorithms are not to
be underestimated - but not overestimated either.

And knowing assembly can give better algorithm implementations, simply
because the programmer is more aware of the underlying hardware. It can
help when you are trying to decide if you should be fiddling with
objects, or pointers to objects, for example.


false.
Ads