2 ms·
Reminds me of the FEniCS[1] project, a framework for solving partial differential equations, which I got introduced to some 10 years ago during my studies. LLV
by magicalhippo 8y ago
Reminds me of the FEniCS[1] project, a framework for solving partial differential equations, which I got introduced to some 10 years ago during my studies.
LLVM wasn't a thing back then so they generated C++ source code which got compiled into a Python module which was loaded back into the running Python script and executed.
The translation pass also allowed for optimizations, for example if one of the inputs was a constant it could call a different library function which handled that special case. The result was a very flexible solver which allowed you to write code that looked almost like the math you were trying to solve, yet could match or beat a handwritten solver.
[1]: https://fenicsproject.org/ https://fenicsproject.org/