4 ms·
> I'm very interested in how dynamically generated code interacts with instruction and micro-op caching on modern processors. My basic mental model is that whe
by haberman 13y ago
> I'm very interested in how dynamically generated code interacts with instruction and micro-op caching on modern processors.
My basic mental model is that whenever you write to an executable page you pay a significant overhead. Basically all of the performance caveats that apply to self-modifying code would apply here; a good starting point might be http://en.wikipedia.org/wiki/Self-modifying_code http://en.wikipedia.org/wiki/Self-modifying_code
In my application the code generation is a one-time up-front cost that is easily amortized over the subsequent execution, so I haven't had a need to explore this question in more depth.
> JIT-like approaches seem to be the frontier for fast decompression schemes.
Interesting, I have been feeling lately like this might be an area where JIT-like approaches could yield a big benefit, but hadn't seen any actual work in this area. Do you have references to anyone doing any kind of work like that?
- thedigitalengel 13y agoI don't know if this counts, but the linux kernel famously uses a JIT to filter network packets: https://github.com/torvalds/linux/blob/master/arch/x86/net/bpf_jit_comp.c https://github.com/torvalds/linux/blob/master/arch/x86/net/b...