gbdev / rgbds

Rednex Game Boy Development System - An assembly toolchain for the Nintendo Game Boy and Game Boy Color
https://rgbds.gbdev.io
MIT License
1.32k stars 176 forks source link

Performance improvements for C++ #1364

Closed Rangi42 closed 2 months ago

Rangi42 commented 5 months ago

In the past few weeks we've been transitioning from C-style manual malloc and free (with over a dozen manually realloced collections, and known memory leaks in RGBASM, including some intentional ones essential to how it works) to C++-style STL generic (containers, algorithms, etc). This has in some cases reduced performance (particularly with older compilers).

Some possibilities for optimization:

Rangi42 commented 2 months ago

Performance has been brought reasonably close to 0.7.0; the Bison-based parser is the main slowdown, but not a drastic one.