3 ms·
It’s also notable that the core algorithm is not a function, but a macro. That means that you end up with an exact representation of the algorithm to the constr
by whartung 2y ago
It’s also notable that the core algorithm is not a function, but a macro. That means that you end up with an exact representation of the algorithm to the constraints as defined, instead of a general purpose algorithm with parameters.
I imagine this could be done with C++ templates as well, I’ve just never used them myself.
But this gives the compiler ample opportunities to optimize, since the code is specific to the desired domain. It also hides a bunch of the clutter that typically accompanies optimized Common Lisp code with all of the declares, declaims, and type specifiers.
- pjmlp 2y agoWith modern C++, it would be a mix of templates, constexpr, constinit and consteval. However I am also on for some Lisp love.