3 ms·
Somewhat tangential - the LuaJIT source [1] is an absolute masterpiece of software engineering in C. The detailed comments (especially on the optimizations - "l
by ajtulloch 13y ago
Somewhat tangential - the LuaJIT source [1] is an absolute masterpiece of software engineering in C. The detailed comments (especially on the optimizations - "luajit/src/lj_opt...") are incredibly interesting reading.
One of my favourite quotes is at https://github.com/LuaDist/luajit/blob/master/src/lj_opt_narrow.c#L155 https://github.com/LuaDist/luajit/blob/master/src/lj_opt_nar...
** [A recursive backpropagation algorithm with backtracking, employing
** skip-list lookup and round-robin caching, emitting stack operations
** on-the-fly for a stack-based interpreter -- and all of that in a meager
** kilobyte? Yep, compilers are a great treasure chest. Throw away your
** textbooks and read the codebase of a compiler today!]
[1]: https://github.com/LuaDist/luajit https://github.com/LuaDist/luajit
- malkia 13y agoI've borrowed the way Mike writes his enum macros.