2 ms·
I'm very interested in how dynamically generated code interacts with instruction and micro-op caching on modern processors. I'm working on intersecting lists o
by nkurz 13y ago
I'm very interested in how dynamically generated code interacts with instruction and micro-op caching on modern processors. I'm working on intersecting lists of compressed integers at really quickly, and JIT-like approaches seem to be the frontier for fast decompression schemes. It seems likely you've thought about this. Any suggestions?
http://stackoverflow.com/questions/17738154/how-can-i-write-self-modifying-code-that-runs-efficiently-on-modern-x64-processo http://stackoverflow.com/questions/17738154/how-can-i-write-...
- 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...