Been wanting to do this for a long time.
This does impose performance issues when building with the vanilla
release profile, as cargo does not perform optimizations across crate
boundary (we care mostly about inlining).
so I added release-lto profile
Also fixed some broken stuff I found across the project, meh
Former-commit-id: 06d03263cc6245313f3ea22c715479ab6da7c4d4
Former-commit-id: f93abd10c67ea8a3b8072b47462be5eca4f3e02b
Of course only arm-wrestler caught it while mgba suite/eggvance did not :(
Former-commit-id: a5dcaa9b40c8a5a5d5fb1e531a601361869a041f
Former-commit-id: eb8d30a3c1cf9c39425b29e6d8386ac2b68a424b
Instead of using a struct member to hold the last barrel shifter carry output, which is expansive as it needs to be saved/loaded from memory, I now pass the carry around as an INOUT parameter.
Using perf anotate really shows high perctile of samples being spent on reading/writing `self.bs_carry_out`
Since this is a rather "surgical" changeset, I have made sure to run it against eggvance test suite, mGBA test suite and some games as well.
I actually saw better improvements than what the benchmark measured, but 7% is decent enough :)
```
run_60_frames time: [180.18 ms 180.45 ms 180.77 ms]
change: [-7.2464% -6.9081% -6.6324%] (p = 0.00 < 0.05)
Performance has improved.
```
Former-commit-id: 7cd7105a07aa0b78cab9dc8bbae3682b02b7ab7c
Former-commit-id: c68514beb3fa6c34f5f65544acbead21e527dbb0
Fulfill TODO from long ago, I used perf-record (--call-graph dwarf) and detected that add_cycles() was hot enough,
I added 2 optimizations:
- Removed bound checks from array accesses
- Increase the LUT size to include dummy entries for open-bus to eliminate the if check
run_60_frames time: [183.65 ms 183.69 ms 183.73 ms]
change: [-9.4414% -9.2849% -9.1315%] (p = 0.00 < 0.05)
Performance has improved.
Former-commit-id: 1cbb596b856e604ad6c48eb0d47771e7cee44d1e
Former-commit-id: 9f15e35237f343d0c816fd9d51d81081736d9e17
Also, clean up some of the cfg(debug) mess
benchmark report:
run_60_frames time: [110.61 ms 111.01 ms 111.42 ms]
change: [-7.1171% -6.5425% -5.9132%] (p = 0.00 < 0.05)
Performance has improved.
Former-commit-id: 9cb82e483c8a78632d0deae20adca9fc1843a76b
Former-commit-id: 6d9be5ddaf72f2b9c02063fa067f2ffbaea4fdb6
* Convert gpu bitfield!() registers to unpacked form, and defer pack/unpack to bus read/write operations
Former-commit-id: 26e7d7d62d6418ce7bcdb8e414cabe5ddb56333d
Former-commit-id: 716ddd9fe2b7b95b7613fc549a7bee406272478b
run_60_frames time: [158.26 ms 160.84 ms 163.03 ms]
change: [-24.960% -18.808% -12.975%] (p = 0.00 < 0.05)
Performance has improved.
Wasn't expecting such an improvment tbh, but who am I to argue with results
Former-commit-id: a5ba74bffa26d962a232c0767a34a7d67ed8ccb4
Former-commit-id: 1b9b301ba9012e79e66822ac39af51df28c51fa4
It's quite an handy way to log messages from ROMs, so I thought it'd be nice to add it.
Former-commit-id: 6869bdb58cfa883ac1ca6832f0bbeeab0edcf552
Former-commit-id: 89d7d826c7a906bbb68f9f4305bb92cd50bb2296
Fixes#109Fixes#106
Fixes MegaMan email menu freezing and probably some more games
Former-commit-id: ed37520f2bc732b07334261dfe3d23cccf3fc04c
Former-commit-id: d7f206b0f405ffe09a3b36d90268f1d683a64cea
Just directly impl Bus trait for Box<[u8]>
Former-commit-id: 7b8a29972520afb7ff197708b9c2146b293a5f29
Former-commit-id: 0c528165ed899fad14b1e25995fdfe8ae004da2a