Skip to content

perf: split namespace and data into separate parameters in Push to enable direct usage of rsmt2d buffers #306

@mcrakhman

Description

@mcrakhman

The idea is that right now in rsmt2d we always copy the data that goes into leaves, we do that, because for extended square we replace the first namespaceSize bytes of the leaf with parity namespace (for ODS we use the data as is). If we split the parameters (i.e. namespace and data), we could actually not copy the leaf and just take the same byte pointer from rsmt2d. I tried doing this in a branch and this is the best option of all performance-wise (it is better than copy the data, even if we reuse the buffers in which we are copying).

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