Skip to content

Performance trap solver.reset() #16

@ColaColin

Description

@ColaColin

I needed to generate a dataset of connect 4 positions from python. The quickest way to do so seemed to be to just call the main.cpp with subprocess. That worked alright, but was slow.

Long story short: solver.reset() triggers the transposition table to be reset. That means writing 80mb of zeros to memory. Even when you try to multi thread and run multiple solvers in parallel you won't see any speed ups, as the program is memory bandwidth bound, that had me quite confused for a few hours.

It might be prudent to remove the transposition table reset from the main, it might save somebody else some time debugging performance issues :)

Apart from this nasty trap: Great work on this solver, it really helps my current project a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions