Skip to content

[Proposal] Native C++ FST Writer implementation (2x Speedup) - Interest in Adoption? #16

@johnjohnlin

Description

@johnjohnlin

Hi Tony and maintainers,

I have been working on optimizing the FST writer performance for Verilator.

The Optimization: I implemented a native C++ rewrite of the FST writer. The key architectural change is moving from string-based intermediate storage to native integer (uintX_t) storage. This eliminates the overhead of integer-to-string conversions during simulation, resulting in a 2x speedup in dumping time for Verilator simulations (tested on a RISC-V core).

Compatibility:

  • The implementation is API-compatible.
  • It provides a native C++ class for performance.
  • It includes an extern "C" wrapper, making it a drop-in replacement for the existing C API.

The Question: I am coordinating with Wilson Snyder regarding integrating this into Verilator. He suggested I reach out to ask if gtkwave would be interested in adopting this C++ implementation upstream (Link)?

We are open to licensing this under MIT to match libfst.

If you are interested, I can prepare a PR or a standalone repository for review. If gtkwave prefers to stay strictly C-only, we will proceed with maintaining this as a separate library for Verilator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions