Skip to content

Lingering comment documenting ECMULT_WINDOW_SIZE large values' costs #1766

@hebasto

Description

@hebasto

The following comment:

/** Larger values for ECMULT_WINDOW_SIZE result in possibly better
* performance at the cost of an exponentially larger precomputed
* table. The exact table size is
* (1 << (WINDOW_G - 2)) * sizeof(secp256k1_ge_storage) bytes,
* where sizeof(secp256k1_ge_storage) is typically 64 bytes but can
* be larger due to platform-specific padding and alignment.
* Two tables of this size are used (due to the endomorphism
* optimization).
*/

appears quite confusing to me, as it refers to WINDOW_G, while residing in the code that sets WINDOW_A.

This comment became lingering and out of context since commit 6815761.

Removing it seems reasonable, as its content is already covered by the --with-ecmult-window configuration option help string. However, this would overlook its original purpose to document the ECMULT_WINDOW_SIZE definition when our build system is not used.

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