Optimize readLong_b to read 32bit at once from the serial buffer.#95
Conversation
|
most awesome I've already tested this and can confirm that it does indeed deliver the big bandwidth increase @breakintoprogram please merge ASAP 😁 |
|
Thanks. That looks reasonable to me. I'll merge and test later. |
|
Awesome. It's surprising (to me) at the first glance that this change makes such a notable difference ! |
the reason for this I believe is that essentially the previous version was calling I kinda get why it's a fairly big improvement - and conversely am also still surprised by how big an improvement it is. 😁 gives me some ideas for some further improvements that can be made - but those will have to wait a little while. |
|
I was a bit surprised as well. But you have to remember this is a 32bit CPU. It's most happy to fetch 32bit around. It could basically as costly to fetch 32bit at once or just 8bit. |
This small change does optimize the upload speed from the ez80 to the VDP. The attached benchmark shows upload speed of 227kbits with the current code and 749kbits with my change. You can also "feel" the difference if you start games like rokky.
agon-bench.zip