Skip to content

Improved memoization logic #44

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

It makes no sense to cache large values that are fast to compute. Likewise, once we need to clear memoized values to free space, we need to decide which values to remove.

Desired solution

When memoizing, also track

  • last access,
  • time to compute value,
  • time to perform lookup in memoization table (equality check can also be expensive),
  • size of value.

Then evaluate different strategies for

  • deciding which values to memoize at all,
  • which values to remove to free space.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions