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

feat: Drop strict mode in favor of leniency flags. #234

Merged
merged 5 commits into from
Jul 31, 2023

Conversation

ShogunPanda
Copy link
Contributor

This PR drops completely the strict mode in favor of three new leniency flags.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

does this impact the benchmarks at all?

@ShogunPanda
Copy link
Contributor Author

ShogunPanda commented Jul 25, 2023

Nope, nothing at all.

Before:

> llhttp@8.1.1 bench /Volumes/DATI/Users/Shogun/Programmazione/Work/NearForm/internal/llhttp
> ts-node bench/

url loose (C)
8192.00 mb | 2559.11 mb/s | 51604286.45 ops/sec | 3.20 s
url strict (C)
8192.00 mb | 2328.31 mb/s | 46950162.77 ops/sec | 3.52 s
http loose: "seanmonstar/httparse" (C)
8192.00 mb | 1690.68 mb/s | 2521771.31 ops/sec | 4.85 s
http strict: "seanmonstar/httparse" (C)
8192.00 mb | 1693.59 mb/s | 2526117.23 ops/sec | 4.84 s
http loose: "nodejs/http-parser" (C)
8192.00 mb | 1375.00 mb/s | 2772670.79 ops/sec | 5.96 s
http strict: "nodejs/http-parser" (C)
8192.00 mb | 1400.48 mb/s | 2824064.73 ops/sec | 5.85 s

After (consider that the new mode is equivalent to the old strict mode):

> llhttp@8.1.1 bench /Volumes/DATI/Users/Shogun/Programmazione/Work/NearForm/internal/llhttp
> ts-node bench/

url (C)
8192.00 mb | 2353.59 mb/s | 47460018.51 ops/sec | 3.48 s
http: "seanmonstar/httparse" (C)
8192.00 mb | 1699.92 mb/s | 2535553.77 ops/sec | 4.82 s
http: "nodejs/http-parser" (C)
8192.00 mb | 1393.77 mb/s | 2810517.62 ops/sec | 5.88 s

Are we good to merge and release?

@ShogunPanda ShogunPanda mentioned this pull request Jul 25, 2023
Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's missing the breaking change label, right? Also, would be great to have a PR description so people can look at it when evaluating llhttp 9

README.md Outdated Show resolved Hide resolved
@ShogunPanda ShogunPanda merged commit 6d04465 into nodejs:main Jul 31, 2023
7 checks passed
@ShogunPanda ShogunPanda deleted the no-strict-mode branch July 31, 2023 13:35
@davidbolvansky
Copy link

For people coming from old http_parser it would be good to write steps how to migrate to llhttp if they used STRICT=OFF in cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants