Skip to content

Conversation

@HEIHUAa
Copy link
Contributor

@HEIHUAa HEIHUAa commented Jan 21, 2026

Added HXCPP configuration options for performance optimization.

I'm not sure which ones are enabled by default, so I simply added them all together.

Here's a brief description of the potential optimizations each new addition may bring:

  • HXCPP_GC_GENERATIONAL: Makes garbage collection scan mostly only recent, new memory in most cases.
  • HXCPP_GC_DYNAMIC_SIZE: Automatically adjusts the GC memory strategy based on runtime conditions.
  • HXCPP_CPP17: Uses the C++17 compiler, which may bring more modern and intelligent optimizations. (Some of these settings also depend on it)
  • HXCPP_GC_BIG_BLOCKS: Increases memory capacity to near-unlimited, reduces memory fragmentation, and improves large resource loading capability. This also means the number of arrows is no longer limited (Before enabling this, I experienced crashes when the note count reached around 70k during casual play).
  • HXCPP_FAST_LINK: Improves compilation speed (though I didn't really notice a difference).

You can also download the build from https://github.com/HEIHUAa/CodenameEngine-HEIHUA/actions/runs/21208146062 for testing.

I tested this under modcharts, which have a significant impact on memory usage. With the frame rate capped at a maximum of 200, the test results showed that the 1% low FPS increased from around 75 to 150.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant