4 ms·
E.g. generating performance-critical DSP code at runtime, depending on the execution environment, e.g. cache-line width. Of course you can pre-generate common v
by aaaaaaaaaaab 5y ago
E.g. generating performance-critical DSP code at runtime, depending on the execution environment, e.g. cache-line width. Of course you can pre-generate common variants, but code size will be exponential in the number of parameters.
- immibis 5y agoThe linked article is not about self-modifying code, but self-modifying executable files on disk.
- ktpsns 5y agoCompiling code at runtime is not self-modifying. For instance, in GPGPU programming, the kernels (=code running on GPUs) are usually compiled at runtime. And of course any time of JITs in scripting languages do the same.
- aaaaaaaaaaab 5y agoOk, then consider a lazy-loading dynamic linker that rewrites the thunks when the library is loaded.
- smasher164 5y agoWhat about rewriting CPU feature-detection code to remove branching?
- dataflow 5y agoYeah, I think this is the answer to OP's question.