Originally posted by wizard69
View Post
The corner cases these days are for tools where C actually will outperform scripting languages, given the standard development constraints Good = featureful and performant, Correct= bug-free, and Fast being on time and on budget. Those corner cases are getting fewer all the time.
The real gains for C are in reduced memory usage, which helps with resource-constrained scenarios like embedded, device drivers, kernel, bootstrap. Languages like Rust and Go are starting to make inroads into those arenas now. Hell even the kernel has eBPF for reducing the kernel code while increasing performance for dynamic problem solving scenarios which are hard to code efficiently in AOT-compiled languages like C.
Brendan Eich semi-seriously joked that kernel mode Javascript is coming, because moving it to the kernel would provide the ultimate performance level and once it's there, it becomes a compilation target for all other languages lol, becoming the single unifying platform-independent runtime that sysadmins have been dreaming of for half a century (which was DaoOS's goal, Java's goal, C#'s goal, Rust's goal, so why not Javascript? lol!)
Assembly, HDL/Verilog, and hard wiring still own the real-time, deterministic operation arena, for microcontrollers, FPGAs, CPLDs, board logic, and very high frequency operation. But Python and Javascript have even made inroads into microcontrollers in recent years. Clearly you're not going to bit-bash an I2C interface with 2 GPIO pins in any scripting language, regardless of how fast it is, because it won't be deterministic enough to produce the correct waveforms. But you can call a compiled-in C I2C library asymptotically as fast from Python and JS as from C.
Comment