Peanut-GB
Peanut-GB copied to clipboard
core: return pointer on gb_read
On consecutive reads, it may be faster to obtain a pointer to ROM data on a single call to gb_read, rather than calling gb_read for each byte read.
The same optimisation could also be performed for gb_write.
Work being done on https://github.com/deltabeard/Peanut-GB/tree/pointer branch.
Reading ROM data is probably inlined by the compiler. Profiling needs to be performed to see if using a pointer instead of a function actually results in any speed improvement.