Skip to content

Deserializing many TypeReps may lead to high residency #143

@treeowl

Description

@treeowl

Deserialized TypeReps don't share any structure with each other, which can potentially waste a lot of space. For example, if I fill a giant Set with deserialized Dynamic values, the lion's share of the space could be taken up by the TypeReps. One potential fix would be to maintain weak tables holding deserialized TyCons and TypeReps. We could use one of type Map Fingerprint (exists a. Weak (TypeRep a)) and one of type Map Fingerprint (Weak TyCon), but other sorts of maps would probably be faster. When a (perhaps recursively) deserialized TyCon or TypeRep matches one stored in the table, it would be thrown away in favor of the stored one.

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