assemblycpuperformancemachine-codepopularity

Is assembly the only low level programming language, and if not is it the most widely used?


I've started learning assembly recently and as I've looked across the internet I see more and more people saying that assembly is not useless, but it's also not worth the time to program things in a language that requires such time and effort compared to high level languages. Is the efficiency between a high level language program and a low level one really not even noticeable enough to pay attention to nowadays, and is there another low level language like assembly that is more widely used?


Solution

  • Is the efficiency between a high level language program and a low level one really not even noticeable enough to pay attention to nowadays

    Oftentimes, compilers generate a lot better assembly than developers can write. There are certain developers who can beat the compiler. But since writing low-level code requires more attention to details and is harder to write and maintain, it is usually only a small specific pieces of code that get implemented in assembly for efficiency. The difference can be noticeable. But it also can be not-noticable if developers do false-optimizations.

    I'd recommend you read Michael Abrash's Graphics Programming Black Book — it has a lot on assembly and optimizations + nice stories from real-life.

    and is there another low level language like assembly that is more widely used?

    Assembler is probably the lowest level application programming language. The only other resort would be to write binary code by hand, but binary opcodes can hardly be called a "language".

    However, programming goes beyond software. Hardware needs to be programmed, too. There are hardware description languages (HDL) that can be used to program hardware (i.e. you can create your own CPU). The most popular HDL languages are Verilog and VHDL.