Peanut-GB icon indicating copy to clipboard operation
Peanut-GB copied to clipboard

core: return pointer on gb_read

Open deltabeard opened this issue 2 years ago • 2 comments

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.

deltabeard avatar Aug 27 '22 23:08 deltabeard

Work being done on https://github.com/deltabeard/Peanut-GB/tree/pointer branch.

deltabeard avatar Nov 14 '22 10:11 deltabeard

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.

deltabeard avatar May 26 '23 14:05 deltabeard