Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make HardLight, Saturation, Fill and FileFinder faster #855
See the commit messages for detailed info.
I also measured hard light with and without lookup table. The lookup is cache unfriendly (64kb) but is faster then direct calculation because Hard light has a 50% branch prediction miss chance per color...
For saturation would be more tricky because RGB are combined here, I "only" saved an alloc and a blit here.
Fill (AddBackground, called once per frame) is also faster now by using OP_SRC which doesn't handle alpha correctly but that doesn't matter in this case.
Sorry I also added a non-blit operation to the speedups:
For zegeris old test case this reduces the parsing time on Windows for me from 0.35 seconds to 0.000287 seconds (!)
This needs a test on all systems because readdir doesn't give this guarantee that the field is populated with useful data.
At least on the 3DS it doesn't work but I already have a solution by looking at other sourcecode.
About the new commits:
Additionally the background color of the system graphic is not rendered anymore for map scenes.
Sprites that would be rendered out of bounds are not rendered anymore.
All in all this gives a gigantic frame boost on the 3DS from 35 to 57 FPS on the world map of testgame.
Apr 5, 2016
Great, this reflects my basic benchmarks which showed up to +33% in average (based on CPU usage, this doesn't scale linear with the FPS).