Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: return pointer on gb_read #64

Open
deltabeard opened this issue Aug 27, 2022 · 2 comments
Open

core: return pointer on gb_read #64

deltabeard opened this issue Aug 27, 2022 · 2 comments
Labels
diff: complex A difficult issue; may require significant planning. Performance Issues or bugs related to performance improvements & regressions.
Milestone

Comments

@deltabeard
Copy link
Owner

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 deltabeard added diff: complex A difficult issue; may require significant planning. Performance Issues or bugs related to performance improvements & regressions. labels Aug 27, 2022
@deltabeard deltabeard added this to the v2 milestone Aug 27, 2022
@deltabeard
Copy link
Owner Author

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

@deltabeard
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diff: complex A difficult issue; may require significant planning. Performance Issues or bugs related to performance improvements & regressions.
Projects
None yet
Development

No branches or pull requests

1 participant