Baekalfen / PyBoy

Game Boy emulator written in Python
Other
4.57k stars 472 forks source link

Improve numpy screen grabbing performance #266

Closed thatguy11325 closed 10 months ago

thatguy11325 commented 10 months ago

This PR improves PyBoy's speed when using botsupport_manager().screen().screen_ndarray(). From personal testing with py-spy, these changes decreased the time spent in screen_ndarray() from ~6% to ~2%.