Convert type of eta to int #1210

pull roconnor-blockstream wants to merge 2 commits into bitcoin-core:master from roconnor-blockstream:20230206_int_eta changing 2 files +8 −8
  1. roconnor-blockstream commented at 1:46 AM on February 7, 2023: contributor

    Almost everywhere eta is cast to or otherwise treated as an int.

    I suspect that the existing int64_t treatment of eta is a carryover from the constant time code where the specific type is perhaps more important.

  2. Typo in comment
    eta -> zeta
    574e917d88
  3. Convert type of eta to int
    Almost everywhere eta is cast to or otherwise treated as an int.
    15d8cde53d
  4. sipa commented at 10:06 PM on February 7, 2023: contributor

    On AMD Ryzen 5950X, GCC 12.2.0:

    At -O2, master:

    scalar_inverse                ,     2.155     ,     2.155     ,     2.156  
    scalar_inverse_var            ,     1.419     ,     1.420     ,     1.422  
    field_inverse                 ,     2.149     ,     2.149     ,     2.150  
    field_inverse_var             ,     1.408     ,     1.409     ,     1.410  
    Benchmark                     ,    Min(us)    ,    Avg(us)    ,    Max(us)    
    

    At -O2, this PR:

    scalar_inverse                ,     2.155     ,     2.156     ,     2.157  
    scalar_inverse_var            ,     1.456     ,     1.457     ,     1.457  
    field_inverse                 ,     2.147     ,     2.148     ,     2.149  
    field_inverse_var             ,     1.449     ,     1.450     ,     1.451  
    

    (~2.5% slower)

    At -O3, master:

    scalar_inverse                ,     2.260     ,     2.260     ,     2.261  
    scalar_inverse_var            ,     1.397     ,     1.398     ,     1.399  
    field_inverse                 ,     2.214     ,     2.214     ,     2.215  
    field_inverse_var             ,     1.382     ,     1.383     ,     1.384  
    

    At -O3, this PR:

    scalar_inverse                ,     2.259     ,     2.260     ,     2.261  
    scalar_inverse_var            ,     1.387     ,     1.387     ,     1.388  
    field_inverse                 ,     2.214     ,     2.214     ,     2.214  
    field_inverse_var             ,     1.366     ,     1.366     ,     1.366  
    

    (~1% faster)

  5. roconnor-blockstream commented at 4:45 PM on February 28, 2023: contributor

    Oh well.

  6. roconnor-blockstream closed this on Feb 28, 2023


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me