I take that the obvious advantages are maintainability, programmer-friendliness etc. but what are the disadvantages?
Is the compiler being put under extra work to convert where it may not be necessary?
Are there situations where low-level languages are better suited to a task because of aforementioned disadvantages?
In short: Low Level Languages can yield better performance due to very specific optimizations.
Advantages of Low Level Languages:
Disadvantages of High Level Languages:
Here a more detailed list of Advantages of LLL:
- you can access machine-dependent registers and I/O
- you can control the exact code behavior in critical sections that might otherwise involve deadlock between multiple software threads or hardware devices
- you can break the conventions of your usual compiler, which might allow some optimizations (like temporarily breaking rules about
memory allocation, threading, calling conventions, etc)- you can build interfaces between code fragments using incompatible conventions (e.g. produced by different compilers, or separated by a
low-level interface)- you can get access to unusual programming modes of your processor (e.g. 16 bit mode to interface startup, firmware, or legacy code on
Intel PCs)- you can produce reasonably fast code for tight loops to cope with a bad non-optimizing compiler (but then, there are free optimizing
compilers available!)- you can produce hand-optimized code perfectly tuned for your particular hardware setup, though not to someone else's
- you can write some code for your new language's optimizing compiler (that is something what very few ones will ever do, and even they not often)
- i.e. you can be in complete control of your code