3 ms·
From my experience C is very fast to compile. Especially compared to C++, because of the metaprogramming and monomorphization stuff. In C you would use void*.
by deaddabe 5y ago
From my experience C is very fast to compile. Especially compared to C++, because of the metaprogramming and monomorphization stuff. In C you would use void*.
Dynamic dispatch is faster to compile than static dispatch, but runtime performance differs. You can do dynamic dispatch in Rust, I think it could enable faster/smaller builds but at the cost of worst runtime performance.
Tradeoffs, Yada Yada.
- pjmlp 5y agoOn our C projects back in the 2000's, a full build took around one hour, composed of Apache, IIS ISAPI modules, our own mod_tcl fork, all the TCL database drivers for MS SQL Server, Sybase SQL Server, Informix, Oracle, and several other native modules. Then we had to repeat it for HP-UX, Aix, Solaris, Windows NT/2000, in release and debug variants. A release would be a day event, so fast to compile is relative.
- cb321 5y agoWhile I agree the common pattern is to use void*/dynamic dispatch, this is not necessary. E.g., https://github.com/glouw/ctl/ https://github.com/glouw/ctl/ or https://github.com/c-blake/bst https://github.com/c-blake/bst show a couple ways to have generic code statically specialized in regular old C. (Instantiation/specialization is just marginally less automatic/syntactically supported.)