Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box value encoded in a variant to reduce enum stack space #996

Merged
merged 1 commit into from May 20, 2022

Commits on May 19, 2022

  1. Box value encoded in a variant to reduce enum stack space

    before
    
    ```
    print-type-size type: `util::psbt::error::Error`: 120 bytes, alignment: 8 bytes
    print-type-size     discriminant: 1 bytes
    print-type-size     variant `CombineInconsistentKeySources`: 115 bytes
    print-type-size         padding: 3 bytes
    print-type-size         field `.0`: 112 bytes, alignment: 4 bytes
    print-type-size     variant `InvalidKey`: 39 bytes
    print-type-size         padding: 7 bytes
    print-type-size         field `.0`: 32 bytes, alignment: 8 bytes
    ```
    
    after
    ```
    print-type-size type: `util::psbt::error::Error`: 40 bytes, alignment: 8 bytes
    print-type-size     discriminant: 1 bytes
    print-type-size     variant `InvalidKey`: 39 bytes
    print-type-size         padding: 7 bytes
    print-type-size         field `.0`: 32 bytes, alignment: 8 bytes
    print-type-size     variant `DuplicateKey`: 39 bytes
    print-type-size         padding: 7 bytes
    print-type-size         field `.0`: 32 bytes, alignment: 8 bytes
    ```
    RCasatta committed May 19, 2022
    Copy the full SHA
    9906cea View commit details
    Browse the repository at this point in the history