Skip to content

Consider storing the sum tree as a dynamic array #153

Description

@Stebalien

Right now, it's stored as a mapping. Unfortunately, that means:

  1. We waste a hash syscall every time we do a lookup (not huge).
  2. Every step will access a random slot which will lead to an IPLD load.

If we switch to a dynamic array, I think the last 5 steps (once we're within 5 bits of the target) should all fall within 1-2 IPLD nodes so we should save 4-5 IPLD loads every time we search.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    • Status
      🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions