Saturday, 14 November 2026

Low Level vs. High Level Programming.

Low Level programming (C and Assembler in this case) is long, tedious and difficult, but it can be very fast and precise even if it's easy to make a lot of errors in process. It can allow to use the most from the hardware it's designed for.

However, it's scientifically proven that the less lines of code, the less errors. Using Higher Level programming languages usually results in less lines of code.

High Level programming (Java for example) is easier and faster to use, cheaper too (programmers are paid for their work hours). Less errors and larger, quite complex systems are now practically possible. It's easier to keep up with reality changes (for example when Laws are modified and/or when markets change), modifying or rewritting code to make it answer better to new reality needs. Programmers can optimize many things, including their own costs and work time.

Faster production time can also make the difference. Not only faster reaction time to changing market needs, but also Solution Pioneer status. Pioneer solutions, new solutions released before competition, can give Market Leader benefits.

Sometimes we do not require software to be very fast. It doesn't matter much whether the internet browser displays a web page in half of a second or less. There are delays associated with internet traffic too, afterall. In these cases, it's not worth the extremally larger money costs and much longer production time of the web page software construction and maintenance.

In other times software speed can be crucial, for example when weapon control systems of fighter jet plane lock-on on enemy fighter planes. Various fights and their parts are often the race against the time.

--
C is higher abstraction level programming language than Assembler.

While Assembler programs can be faster, can take advantage of the specific hardware design nuances, and while Assembler code can be smaller and fit in faster Processor Caches (which can make it even more lightning-fast), programming in C is not much slower and has one great advantage: when processor and/or other hardware changes, code written in C can be just recompiled without many or sometimes even without any changes. C compilers can automate optimization for new hardware.

After hardware changes, adapting and optimizing Assembler code for new hardware is seriously harder and longer process than when using C compiler.

--
In practice, it's often possible to write parts of a program in one language, and other parts in other language(s). Code parts written in C, for example, can be linked with code parts written in Assembler.

For combining Java code with code in other languages, one can use the JNI mechanisms.

No comments:

Post a Comment