2 ms·
Absolutely. People who write games or audio / video software sometimes even do hand-written assembly fragments. The very high-performance things are a relative
by nine_k 10y ago
Absolutely. People who write games or audio / video software sometimes even do hand-written assembly fragments.
The very high-performance things are a relatively narrow area, and an area where C can easily lose to e.g. Fortran.
Also, for ML stuff you likely don't have a huge entrenched C codebase yet. You are freer to choose a more expressive language, and only hand-optimize / rewrite in C a small amount of hot paths.
- shepardrtc 10y agoRegardless of what glue language you use to write ML stuff, if you follow it down to its core, most of it is going to use a BLAS library to do matrix multiplication. That's where the heavy lifting is. And BLAS libraries are in C/C++ or Fortran. For example, OpenBLAS or Intel MKL.
- nine_k 10y agoBLAS Level 1 was released in 1979, thirty seven years ago. There was no other comparable language to implement it in besides Fortran. C was a newcomer at the time, like Rust currently is. The amount of optimization and edge-case handling work that went into BLAS since then is enormous. BTW, Fortran, being mostly aliasing-free, is a safer language than C, and more optimizaton-friendly.
- Gracana 10y agoI thought Fortran's aliasing-free rule was just an assumption of the compiler, not something that it actually enforced.. so you could very easily write code that contained aliasing bugs.