erikzenker / hsm

Finite state machine library based on the boost hana meta programming library. It follows the principles of the boost msm and boost sml libraries, but tries to reduce own complex meta programming code to a minimum.
MIT License
187 stars 18 forks source link

[FEATURE] Documentation. More fsm comparison criteria #168

Closed heretic13 closed 2 years ago

heretic13 commented 2 years ago

I have a complex state machine (with subs) with several dozen states and transitions. Released on boost::msm.

And I have 2 problems with it:

  1. Long compilation time. About 2 minutes for any change of code.
  2. The huge amount of memory required by the compiler to compile the given state machine. I saw with my own eyes the consumption of 7 GB of memory at its peak.

I can forgive the lengthy compilation. There are mechanisms that have helped me reduce the need to constantly recompile the state machine.

But the huge amount of memory for the compiler confuses me a lot. This required me to use VS 2022 (in Preview state) and compile a 64-bit application.

I'm in the middle of looking for a finite state machine library with similar functionality to boost::msm, but requiring less memory to compile (less than 4GB).

Please add an approximate comparison of the memory consumed by the compiler when compiling equivalent state machines for the boost::msm and hsm implementations.

erikzenker commented 2 years ago

Hi @heretic13 will do

erikzenker commented 2 years ago

I got the state machine benchmark running again (https://github.com/erikzenker/state-machine-benchmark/actions). I will add the memory metrics asap.

erikzenker commented 2 years ago

@heretic13 I added results of the state machine benchmark to the project readme https://github.com/erikzenker/hsm#compilememory-benchmark-results