3 ms·
The qrintf preprocessor accelerates sprintf expressions. https://github.com/h2o/qrintf https://github.com/h2o/qrintf Noob question: Can libgccjit be used to do
by specialist 5y ago
The qrintf preprocessor accelerates sprintf expressions. https://github.com/h2o/qrintf https://github.com/h2o/qrintf
Noob question: Can libgccjit be used to do the same at runtime?
- rightbyte 5y agoYes. You can compile arbitrary code at runtime. You can "extract" a function generated with libgccjit as a function pointer and use it in your static code.
- chrisseaton 5y agoAnd the great think about this, compared to static code, is you can compile runtime data into this code if you want. So instead of storing something like a configuration value in a global variable which you then have to read, you can store it in the code!