Use pass-by-reference and move semantics where possible to avoid unnecessary copies, and use result iterator of std::unordered_map::find() to avoid repeated hash table lookups.
Reduce time complexity for seeking and iteration in multi-block buffers by using advanced offset information directly. Also defer advanced offset block lookups until the buffer is resolved and accessed, which should fix some bugs when using the identity buffer ID (65535) in jumps/calls with block-based offsets.
For the buffer adjust command, process contiguous spans of data with highly optimized inner loops, which process 4 bytes at a time with 32-bit memory accesses and operations when possible.
Also fix seeking issues in buffer call/return which were identified during testing.
Use pass-by-reference and move semantics where possible to avoid unnecessary copies, and use result iterator of
std::unordered_map::find()
to avoid repeated hash table lookups.Reduce time complexity for seeking and iteration in multi-block buffers by using advanced offset information directly. Also defer advanced offset block lookups until the buffer is resolved and accessed, which should fix some bugs when using the identity buffer ID (65535) in jumps/calls with block-based offsets.
For the buffer adjust command, process contiguous spans of data with highly optimized inner loops, which process 4 bytes at a time with 32-bit memory accesses and operations when possible.
Also fix seeking issues in buffer call/return which were identified during testing.