3 ms·
But C is neither as powerful as nor as flexible as assembly language.
by stephencanon 5y ago
But C is neither as powerful as nor as flexible as assembly language.
- titzer 5y agoIndeed! I recently hacked up a considerable amount of assembly and used a lot of tricks that would not be possible unless I used copious gotos in C and also non-standard tail-call optimization. Some tricks (like writing inline/out-of-line codepaths) quite literally are not possible in C.
- Koshkin 5y agoI would also add then that assembly language is not as powerful or flexible as VHDL. C is a high-level programming language not unlike, say, Fortran, and its power and flexibility is in expressing calculations and concepts rather than in representing the architecture of a particular processor or in how well-optimized the generated machine code is; compilers are very good at both, and, frankly, they should be expected to do a better job than a human could in a reasonable time - especially when code is still in flux or needs to be refactored.
- School-Cotton 5y agoVectorized numeric kernels still often need to be written by hand, for one example of where modern compilers just aren’t good enough to make writing assembly obsolete.