Skip to content

Performance drop after creating missing NIDs #433

Closed

Description

@marcfedorow

97b3db1
This exact patch gives 2% performance decrease on my RISC-V processor.
test:

openssl speed -evp kuznyechik-ecb -seconds 5

I do not understand how a function that is called once may affect performance that much.

Activity

  1. beldmit commented on Dec 20, 2022

    @beldmit
    Contributor

    If you are looking for a performance, I'd suggest really profile the code. Cipher itself has a lot of place to improve

    BTW, NID allocation may require some locking.

  2. marcfedorow commented on Dec 20, 2022

    @marcfedorow
    ContributorAuthor

    I re-wrote it with inline assembly so that's 2% of optimized score.
    Still, that seems alot.

  3. marcfedorow commented on Dec 20, 2022

    @marcfedorow
    ContributorAuthor

    Performance drop is caused by call of create_NIDs function.
    It is true even if I define it like this
    (which is similar in context of missing_NIDs having 0 elements):

    __attribute__((noinline))
    static int create_NIDs() {
        int i;
        asm("");
        return 1;
    }
  4. marcfedorow commented on Dec 20, 2022

    @marcfedorow
    ContributorAuthor

    Not sure this will be investigated any further so I close this ticket.

  5. added 3 commits that reference this issue on May 24, 2024
    fcf2aae
    ef9c2d8
    a55e233
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions