| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e70b052 commit 0a1474d
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ were tried. However, all of them failed due to resulting significant performance | |||
| 22 | 22 | degradation. | |
| 23 | 23 | ||
| 24 | 24 | This project is a port of [http_parser][0] to TypeScript. [llparse][1] is used | |
| 25 | - to generate the output C and/or bitcode artifacts, which could be compiled and | ||
| 25 | + to generate the output C source file, which could be compiled and | ||
| 26 | 26 | linked with the embedder's program (like [Node.js][7]). | |
| 27 | 27 | ||
| 28 | 28 | ## Performance | |
@@ -31,7 +31,7 @@ So far llhttp outperforms http_parser: | |||
| 31 | 31 | ||
| 32 | 32 | | | input size | bandwidth | reqs/sec | time | | |
| 33 | 33 | |:----------------|-----------:|-------------:|-----------:|--------:| | |
| 34 | - | **llhttp** _(C)_ | 8192.00 mb | 1777.24 mb/s | 3583799.39 ops/sec | 4.61 s | | ||
| 34 | + | **llhttp** | 8192.00 mb | 1777.24 mb/s | 3583799.39 ops/sec | 4.61 s | | ||
| 35 | 35 | | **http_parser** | 8192.00 mb | 694.66 mb/s | 1406180.33 req/sec | 11.79 s | | |
| 36 | 36 | ||
| 37 | 37 | llhttp is faster by approximately **156%**. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | 4 | #define LLHTTP_VERSION_MAJOR 2 | |
| 5 | 5 | #define LLHTTP_VERSION_MINOR 1 | |
| 6 | - #define LLHTTP_VERSION_PATCH 2 | ||
| 6 | + #define LLHTTP_VERSION_PATCH 3 | ||
| 7 | 7 | ||
| 8 | 8 | #ifndef LLHTTP_STRICT_MODE | |
| 9 | 9 | # define LLHTTP_STRICT_MODE 0 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,7 +49,7 @@ static const unsigned char llparse_blob7[] = { | |||
| 49 | 49 | }; | |
| 50 | 50 | #ifdef __SSE4_2__ | |
| 51 | 51 | static const unsigned char ALIGN(16) llparse_blob8[] = { | |
| 52 | - 0x9, 0x9, ' ', '~', 0x80, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, | ||
| 52 | + 0x9, 0x9, ' ', '~', 0x80, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, | ||
| 53 | 53 | 0x0, 0x0, 0x0, 0x0, 0x0 | |
| 54 | 54 | }; | |
| 55 | 55 | #endif /* __SSE4_2__ */ | |
@@ -1595,7 +1595,7 @@ static llparse_state_t llhttp__internal__run( | |||
| 1595 | 1595 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1596 | 1596 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1597 | 1597 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1598 | - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 | ||
| 1598 | + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 1599 | 1599 | }; | |
| 1600 | 1600 | if (p == endp) { | |
| 1601 | 1601 | return s_n_llhttp__internal__n_header_value_connection_token; | |
@@ -1916,7 +1916,7 @@ static llparse_state_t llhttp__internal__run( | |||
| 1916 | 1916 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1917 | 1917 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1918 | 1918 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1919 | - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 | ||
| 1919 | + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 1920 | 1920 | }; | |
| 1921 | 1921 | if (p == endp) { | |
| 1922 | 1922 | return s_n_llhttp__internal__n_header_value; | |
@@ -1975,7 +1975,7 @@ static llparse_state_t llhttp__internal__run( | |||
| 1975 | 1975 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1976 | 1976 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1977 | 1977 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 1978 | - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 | ||
| 1978 | + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 1979 | 1979 | }; | |
| 1980 | 1980 | if (p == endp) { | |
| 1981 | 1981 | return s_n_llhttp__internal__n_header_value_te_token; | |
@@ -6863,7 +6863,7 @@ static const unsigned char llparse_blob7[] = { | |||
| 6863 | 6863 | }; | |
| 6864 | 6864 | #ifdef __SSE4_2__ | |
| 6865 | 6865 | static const unsigned char ALIGN(16) llparse_blob8[] = { | |
| 6866 | - 0x9, 0x9, ' ', '~', 0x80, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, | ||
| 6866 | + 0x9, 0x9, ' ', '~', 0x80, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, | ||
| 6867 | 6867 | 0x0, 0x0, 0x0, 0x0, 0x0 | |
| 6868 | 6868 | }; | |
| 6869 | 6869 | #endif /* __SSE4_2__ */ | |
@@ -8358,7 +8358,7 @@ static llparse_state_t llhttp__internal__run( | |||
| 8358 | 8358 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8359 | 8359 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8360 | 8360 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8361 | - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 | ||
| 8361 | + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 8362 | 8362 | }; | |
| 8363 | 8363 | if (p == endp) { | |
| 8364 | 8364 | return s_n_llhttp__internal__n_header_value_connection_token; | |
@@ -8679,7 +8679,7 @@ static llparse_state_t llhttp__internal__run( | |||
| 8679 | 8679 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8680 | 8680 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8681 | 8681 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8682 | - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 | ||
| 8682 | + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 8683 | 8683 | }; | |
| 8684 | 8684 | if (p == endp) { | |
| 8685 | 8685 | return s_n_llhttp__internal__n_header_value; | |
@@ -8738,7 +8738,7 @@ static llparse_state_t llhttp__internal__run( | |||
| 8738 | 8738 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8739 | 8739 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8740 | 8740 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
| 8741 | - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 | ||
| 8741 | + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 8742 | 8742 | }; | |
| 8743 | 8743 | if (p == endp) { | |
| 8744 | 8744 | return s_n_llhttp__internal__n_header_value_te_token; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments