Skip to content

Implement a Thread Safe LRU Cache #81

@Socrats

Description

@Socrats

We need a thread safe LRU cache to improve the efficiency of the monte-carlo simulations used to estimate stationary distributions and other indicators.

At the moment, we use a cache to store the fitness values that are reused the most (fitness of a strategy given a population state). Since the LRUCache currently implemented is not thread safe, each thread of the simulation must instantiate its own LRU Cache. However, it would probably be much more efficient if the Cache was shared.

Ideally this would allow the use of a single, share LRU cache per simulation. This cache would be shared among each thread/process that is running an independent Monte-Carlo simulation to estimate a given indicator. I have already created an initial file where this new class could be written. See LRUCacheThreadSafe.

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