Skip to content

Consider performance improvements comming from PR to llparse #260

Closed as not planned

Description

@ngrodzitski

Could you, please, look at the PR to llparse; nodejs/llparse#58 ?
That gives a performance boost for llhttp by scanning http-fields faster.

Since llparse seems to be quite stable (last commit in main branch was more than a year ago), thus nobody watches it carefully, and the change was made for llhttp in mind it might be the case that here is the better place to ask to consider the change in llparse.

Activity

  1. changed the title [-]Cnsider performance improvements comming from PR to llparse[/-] [+]Consider performance improvements comming from PR to llparse[/+] on Oct 27, 2023
  2. lemire commented on Nov 8, 2023

    @lemire
    Member

    How did you assess the benefits experimentally?

    PR nodejs/llparse#58 bears on TableLookup. Correct? Is TableLookup used in llhttp directly or indirectly in llhttp?

    Is llhttp built with support for SSSE3 or SSE4.2? I see some flag in the tests, but unless that's also used by Node.js when building for production use, then that's not very useful.

  3. ngrodzitski commented on Nov 8, 2023

    @ngrodzitski
    ContributorAuthor

    That is how I did the benchmark:

    1. Cloned llparse and llhttp locally.
    2. Did the changes in llparse.
    3. Used npm-link so that my llocal llparse version is used in llhttp.
    4. Rebuild llhttp and run a benchmark.

    Is llhttp built with support for SSSE3 or SSE4.2? I see some flag in the tests, but unless that's also used by Node.js when building for production use, then that's not very useful.

    I'm afraid I don't understand how the build of llhttp works, but to verify the changes I temporary modify llparse to provide bad code under SSE-guard macro (like adding #error "Just checking...") and then I can see that the build of llhttp fails.

    Here the a way to run benchmarks (I rerun it after modification to local llparse):

    cd <base_dir>/llhttp
    npm link ../llparse
    npm run build
    npm run test
    npm run bench
    

    I guess that is not a best way to do it, but that is what my expertise in js-stuff was able to came up with.

  4. ShogunPanda commented on Feb 6, 2024

    @ShogunPanda
    Contributor

    Not considering this for now.
    Nobody is maintaining llparse at the moment so we don't really know the infrastructure risk associated with it.

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