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

http: refactor to avoid unsafe array iteration #37124

Merged
merged 1 commit into from
Feb 1, 2021

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Jan 29, 2021

No description provided.

@nodejs-github-bot nodejs-github-bot added the http Issues or PRs related to the http subsystem. label Jan 29, 2021
@TrySound
Copy link

What makes for/of unsafe?

@aduh95
Copy link
Contributor Author

aduh95 commented Jan 29, 2021

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/917/ (queued, will 404 until it starts).

@aduh95
Copy link
Contributor Author

aduh95 commented Jan 29, 2021

What makes for/of unsafe?

for .. of are not unsafe on itself, however using it on arrays in core is: it relies on Array.prototype[Symbol.iterator] and %ArrayIteratorPrototype%.next which are user-mutable.

@Lxxyx Lxxyx added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 30, 2021
@nodejs-github-bot
Copy link
Collaborator

@RaisinTen
Copy link
Contributor

@aduh95
Copy link
Contributor Author

aduh95 commented Jan 30, 2021

Benchmark CI has been hanging for two hours, I've aborted it. No perf regressions or improvements found for the benchmark scripts that have completed.

                                                                                                 confidence improvement accuracy (*)    (**)   (***)
http/bench-parser.jsn=100000 len=16                                                                             -0.85 %       ±3.84%  ±5.27%  ±7.20%
http/bench-parser.jsn=100000 len=32                                                                              0.03 %       ±5.24%  ±7.19%  ±9.79%
http/bench-parser.jsn=100000 len=4                                                                              -4.12 %       ±8.21% ±11.71% ±17.02%
http/bench-parser.jsn=100000 len=8                                                                               0.92 %       ±1.66%  ±2.28%  ±3.12%
http/check_invalid_header_char.jsn=1000000 input=''                                                              0.51 %       ±7.72% ±10.84% ±15.35%
http/check_invalid_header_char.jsn=1000000 input='\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tFoo bar baz'                     1.09 %       ±8.69% ±11.91% ±16.23%
http/check_invalid_header_char.jsn=1000000 input='\\x7F'                                                        -1.37 %       ±6.50%  ±8.92% ±12.16%
http/check_invalid_header_char.jsn=1000000 input='1'                                                      *     -5.70 %       ±5.33%  ±7.30%  ±9.96%
http/check_invalid_header_char.jsn=1000000 input='20091'                                                         3.44 %       ±7.15%  ±9.88% ±13.67%
http/check_invalid_header_char.jsn=1000000 input='close'                                                         2.32 %       ±7.07%  ±9.71% ±13.28%
http/check_invalid_header_char.jsn=1000000 input='en-US'                                                         6.02 %       ±7.10%  ±9.76% ±13.35%
http/check_invalid_header_char.jsn=1000000 input='foo\\nbar'                                                     2.97 %       ±7.90% ±10.85% ±14.84%
http/check_invalid_header_char.jsn=1000000 input='group_acmeair'                                                 0.72 %       ±7.07%  ±9.95% ±14.15%
http/check_invalid_header_char.jsn=1000000 input='gzip'                                                         -6.11 %       ±8.69% ±12.20% ±17.31%
http/check_invalid_header_char.jsn=1000000 input='keep-alive'                                                   -4.59 %       ±5.69%  ±7.93% ±11.10%
http/check_invalid_header_char.jsn=1000000 input='LONG_AND_INVALID'                                             -2.09 %       ±3.89%  ±5.34%  ±7.29%
http/check_invalid_header_char.jsn=1000000 input='private'                                                       1.80 %      ±10.90% ±15.29% ±21.63%
http/check_invalid_header_char.jsn=1000000 input='SAMEORIGIN'                                                   -4.88 %       ±8.99% ±12.72% ±18.27%
http/check_invalid_header_char.jsn=1000000 input='Sat, 07 May 2016 16:54:48 GMT'                          *     -6.42 %       ±6.42%  ±8.93% ±12.48%
http/check_invalid_header_char.jsn=1000000 input='text/html; charset=utf-8'                                     -0.04 %       ±5.77%  ±7.93% ±10.87%
http/check_invalid_header_char.jsn=1000000 input='text/plain'                                                   -2.32 %       ±7.96% ±11.03% ±15.30%
http/check_invalid_header_char.jsn=1000000 input='中文呢'                                                       -1.57 %       ±6.94%  ±9.50% ±12.95%
http/check_is_http_token.jsn=1000000 key=':'                                                                    -5.84 %       ±9.91% ±13.95% ±19.86%
http/check_is_http_token.jsn=1000000 key=':alternate-protocol'                                                  -1.58 %       ±8.52% ±11.89% ±16.68%
http/check_is_http_token.jsn=1000000 key='((((())))'                                                             2.77 %       ±9.87% ±13.52% ±18.44%
http/check_is_http_token.jsn=1000000 key='@@'                                                                    1.81 %       ±7.54% ±10.37% ±14.22%
http/check_is_http_token.jsn=1000000 key='Accept-Ranges'                                                         3.82 %       ±6.74%  ±9.25% ±12.65%
http/check_is_http_token.jsn=1000000 key='alt-svc'                                                               0.22 %       ±8.90% ±12.32% ±17.09%
http/check_is_http_token.jsn=1000000 key='alternate-protocol:'                                                   1.20 %       ±4.67%  ±6.44%  ±8.88%
http/check_is_http_token.jsn=1000000 key='alternate-protocol'                                                    2.81 %       ±4.37%  ±6.03%  ±8.31%
http/check_is_http_token.jsn=1000000 key='Cache-Control'                                                         2.70 %       ±5.09%  ±6.98%  ±9.50%
http/check_is_http_token.jsn=1000000 key='Connection'                                                           -1.54 %       ±5.59%  ±7.67% ±10.47%
http/check_is_http_token.jsn=1000000 key='Content-Encoding'                                                      2.34 %       ±8.90% ±12.23% ±16.73%
http/check_is_http_token.jsn=1000000 key='content-length'                                                       -2.17 %       ±8.56% ±11.94% ±16.72%
http/check_is_http_token.jsn=1000000 key='Content-Location'                                                     -4.52 %       ±8.38% ±11.67% ±16.32%
http/check_is_http_token.jsn=1000000 key='content-type'                                                         -1.56 %       ±8.65% ±12.06% ±16.91%
http/check_is_http_token.jsn=1000000 key='Content-Type'                                                         -0.95 %       ±8.22% ±11.39% ±15.82%
http/check_is_http_token.jsn=1000000 key='date'                                                                  1.80 %       ±6.81%  ±9.33% ±12.71%
http/check_is_http_token.jsn=1000000 key='ETag'                                                                 -4.02 %      ±13.12% ±18.08% ±24.87%
http/check_is_http_token.jsn=1000000 key='Expires'                                                               0.09 %       ±5.11%  ±7.02%  ±9.62%
http/check_is_http_token.jsn=1000000 key='Keep-Alive'                                                            5.61 %       ±6.09%  ±8.34% ±11.36%
http/check_is_http_token.jsn=1000000 key='Last-Modified'                                                        -0.57 %       ±5.35%  ±7.33%  ±9.99%
http/check_is_http_token.jsn=1000000 key='location'                                                             -1.79 %       ±7.43% ±10.18% ±13.88%
http/check_is_http_token.jsn=1000000 key='server'                                                               -1.57 %       ±5.05%  ±6.95%  ±9.53%
http/check_is_http_token.jsn=1000000 key='Server'                                                                4.72 %       ±6.85%  ±9.40% ±12.83%
http/check_is_http_token.jsn=1000000 key='status'                                                                1.60 %       ±5.32%  ±7.30%  ±9.97%
http/check_is_http_token.jsn=1000000 key='TCN'                                                                  -1.99 %       ±9.67% ±13.25% ±18.06%
http/check_is_http_token.jsn=1000000 key='Transfer-Encoding'                                                    -1.30 %       ±6.17%  ±8.45% ±11.52%
http/check_is_http_token.jsn=1000000 key='Vary'                                                                  1.95 %       ±6.35%  ±8.86% ±12.40%
http/check_is_http_token.jsn=1000000 key='version'                                                              -0.41 %       ±9.82% ±13.62% ±18.94%
http/check_is_http_token.jsn=1000000 key='x-frame-options'                                                      -1.90 %       ±5.66%  ±7.75% ±10.56%
http/check_is_http_token.jsn=1000000 key='x-xss-protection'                                                     -3.18 %       ±8.18% ±11.35% ±15.79%
http/check_is_http_token.jsn=1000000 key='中文呢'                                                                7.55 %      ±10.18% ±14.26% ±20.13%
http/chunked.jsduration=5 c=100 len=1 n=1 benchmarker='wrk'                                                      0.15 %       ±0.24%  ±0.33%  ±0.46%
http/chunked.jsduration=5 c=100 len=1 n=16 benchmarker='wrk'                                                    -1.33 %       ±1.46%  ±2.02%  ±2.77%
http/chunked.jsduration=5 c=100 len=1 n=4 benchmarker='wrk'                                                      0.08 %       ±0.37%  ±0.50%  ±0.68%
http/chunked.jsduration=5 c=100 len=1 n=8 benchmarker='wrk'                                                     -0.06 %       ±0.56%  ±0.78%  ±1.08%
http/chunked.jsduration=5 c=100 len=256 n=1 benchmarker='wrk'                                                   -0.16 %       ±0.19%  ±0.26%  ±0.35%
http/chunked.jsduration=5 c=100 len=256 n=16 benchmarker='wrk'                                                  -1.19 %       ±1.63%  ±2.24%  ±3.05%
http/chunked.jsduration=5 c=100 len=256 n=4 benchmarker='wrk'                                                    0.00 %       ±0.35%  ±0.48%  ±0.65%
http/chunked.jsduration=5 c=100 len=256 n=8 benchmarker='wrk'                                                   -0.06 %       ±0.39%  ±0.53%  ±0.73%
http/chunked.jsduration=5 c=100 len=64 n=1 benchmarker='wrk'                                                     0.08 %       ±0.22%  ±0.30%  ±0.41%
http/chunked.jsduration=5 c=100 len=64 n=16 benchmarker='wrk'                                                   -1.53 %       ±1.69%  ±2.32%  ±3.17%
http/chunked.jsduration=5 c=100 len=64 n=4 benchmarker='wrk'                                                    -0.06 %       ±0.35%  ±0.49%  ±0.66%
http/chunked.jsduration=5 c=100 len=64 n=8 benchmarker='wrk'                                                    -0.26 %       ±0.60%  ±0.83%  ±1.14%
http/client-request-body.jsmethod='end' len=1024 type='asc' dur=5                                               -1.83 %      ±17.94% ±24.61% ±33.60%
http/client-request-body.jsmethod='end' len=1024 type='buf' dur=5                                                6.25 %      ±17.32% ±23.74% ±32.37%
http/client-request-body.jsmethod='end' len=1024 type='utf' dur=5                                               -8.59 %      ±13.95% ±19.11% ±26.04%
http/client-request-body.jsmethod='end' len=256 type='asc' dur=5                                                -8.85 %      ±10.81% ±14.86% ±20.36%
http/client-request-body.jsmethod='end' len=256 type='buf' dur=5                                                 2.61 %      ±21.88% ±29.97% ±40.84%
http/client-request-body.jsmethod='end' len=256 type='utf' dur=5                                          *    -18.46 %      ±17.19% ±23.57% ±32.17%
http/client-request-body.jsmethod='end' len=32 type='asc' dur=5                                                  8.82 %      ±16.15% ±22.18% ±30.34%
http/client-request-body.jsmethod='end' len=32 type='buf' dur=5                                                 -1.31 %      ±15.69% ±21.61% ±29.71%
http/client-request-body.jsmethod='end' len=32 type='utf' dur=5                                                 -1.49 %      ±18.36% ±25.20% ±34.42%
http/client-request-body.jsmethod='write' len=1024 type='asc' dur=5                                              4.73 %      ±15.02% ±20.60% ±28.11%
http/client-request-body.jsmethod='write' len=1024 type='buf' dur=5                                              3.42 %      ±13.46% ±18.44% ±25.12%
http/client-request-body.jsmethod='write' len=1024 type='utf' dur=5                                             -6.02 %      ±16.35% ±22.47% ±30.79%
http/client-request-body.jsmethod='write' len=256 type='asc' dur=5                                              -5.10 %      ±16.58% ±22.75% ±31.08%
http/client-request-body.jsmethod='write' len=256 type='buf' dur=5                                              -2.46 %      ±16.47% ±22.61% ±30.88%
http/client-request-body.jsmethod='write' len=256 type='utf' dur=5                                              -8.13 %      ±14.83% ±20.40% ±27.98%
http/client-request-body.jsmethod='write' len=32 type='asc' dur=5                                                9.52 %      ±12.20% ±16.72% ±22.78%
http/client-request-body.jsmethod='write' len=32 type='buf' dur=5                                               -5.69 %      ±16.62% ±22.87% ±31.39%
http/client-request-body.jsmethod='write' len=32 type='utf' dur=5                                                3.74 %      ±19.46% ±26.73% ±36.56%
http/cluster.jsduration=5 c=50 len=1024 type='buffer' benchmarker='wrk'                                          4.02 %      ±12.08% ±16.78% ±23.37%
http/cluster.jsduration=5 c=50 len=1024 type='bytes' benchmarker='wrk'                                           3.45 %      ±12.45% ±17.10% ±23.39%
http/cluster.jsduration=5 c=50 len=102400 type='buffer' benchmarker='wrk'                                        0.29 %       ±7.81% ±10.70% ±14.58%
http/cluster.jsduration=5 c=50 len=102400 type='bytes' benchmarker='wrk'                                        -0.83 %       ±6.45%  ±8.85% ±12.09%
http/cluster.jsduration=5 c=50 len=4 type='buffer' benchmarker='wrk'                                             1.70 %       ±8.46% ±11.60% ±15.82%
http/cluster.jsduration=5 c=50 len=4 type='bytes' benchmarker='wrk'                                             -5.89 %      ±10.30% ±14.17% ±19.43%
http/cluster.jsduration=5 c=500 len=1024 type='buffer' benchmarker='wrk'                                         1.92 %       ±5.57%  ±7.79% ±10.97%
http/cluster.jsduration=5 c=500 len=1024 type='bytes' benchmarker='wrk'                                         -1.11 %       ±7.10%  ±9.76% ±13.39%
http/cluster.jsduration=5 c=500 len=102400 type='buffer' benchmarker='wrk'                                       2.48 %       ±5.96%  ±8.23% ±11.35%
http/cluster.jsduration=5 c=500 len=102400 type='bytes' benchmarker='wrk'                                        2.39 %       ±5.49%  ±7.53% ±10.26%
http/cluster.jsduration=5 c=500 len=4 type='buffer' benchmarker='wrk'                                           -0.29 %       ±5.20%  ±7.18%  ±9.92%
http/cluster.jsduration=5 c=500 len=4 type='bytes' benchmarker='wrk'                                            -2.13 %       ±5.03%  ±6.94%  ±9.57%
http/create-clientrequest.jse=1 arg='options' url='idn'                                                         -4.34 %      ±13.45% ±18.94% ±26.96%
http/create-clientrequest.jse=1 arg='options' url='long'                                                       -10.55 %      ±10.80% ±14.98% ±20.83%
http/create-clientrequest.jse=1 arg='options' url='wpt'                                                          1.28 %      ±14.40% ±19.80% ±27.14%
http/create-clientrequest.jse=1 arg='string' url='idn'                                                          -0.44 %      ±10.02% ±13.83% ±19.06%
http/create-clientrequest.jse=1 arg='string' url='long'                                                   *      8.07 %       ±6.86%  ±9.41% ±12.86%
http/create-clientrequest.jse=1 arg='string' url='wpt'                                                           0.68 %       ±6.79%  ±9.30% ±12.67%
http/create-clientrequest.jse=1 arg='URL' url='idn'                                                              5.62 %       ±8.78% ±12.05% ±16.45%
http/create-clientrequest.jse=1 arg='URL' url='long'                                                            -9.74 %      ±27.88% ±39.49% ±56.78%
http/create-clientrequest.jse=1 arg='URL' url='wpt'                                                             -7.28 %       ±8.58% ±12.13% ±17.38%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=1048576 type='asc' benchmarker='wrk'                   1.82 %       ±4.11%  ±5.76%  ±8.15%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=1048576 type='buf' benchmarker='wrk'                 -11.69 %      ±14.66% ±20.58% ±29.16%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=1048576 type='utf' benchmarker='wrk'                   0.79 %       ±1.89%  ±2.60%  ±3.56%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=131072 type='asc' benchmarker='wrk'                   -1.30 %       ±2.38%  ±3.31%  ±4.62%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=131072 type='buf' benchmarker='wrk'                   -1.68 %       ±4.93%  ±6.80%  ±9.38%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=131072 type='utf' benchmarker='wrk'                   -2.95 %       ±3.72%  ±5.19%  ±7.26%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=262144 type='asc' benchmarker='wrk'                   -0.32 %       ±3.02%  ±4.14%  ±5.64%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=262144 type='buf' benchmarker='wrk'                    1.60 %       ±9.92% ±13.60% ±18.53%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=262144 type='utf' benchmarker='wrk'                   -0.64 %       ±2.63%  ±3.63%  ±5.01%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=65536 type='asc' benchmarker='wrk'                    -0.47 %       ±2.69%  ±3.71%  ±5.09%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=65536 type='buf' benchmarker='wrk'                    -0.41 %       ±4.66%  ±6.41%  ±8.79%
http/end-vs-write-end.jsduration=5 method='end' c=100 len=65536 type='utf' benchmarker='wrk'                    -0.09 %       ±4.90%  ±6.74%  ±9.22%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=1048576 type='asc' benchmarker='wrk'                11.18 %      ±13.57% ±18.69% ±25.70%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=1048576 type='buf' benchmarker='wrk'                -2.49 %      ±19.32% ±26.48% ±36.08%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=1048576 type='utf' benchmarker='wrk'                -4.46 %       ±9.73% ±13.34% ±18.20%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=131072 type='asc' benchmarker='wrk'                  0.90 %       ±5.95%  ±8.15% ±11.11%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=131072 type='buf' benchmarker='wrk'                  0.76 %       ±6.12%  ±8.39% ±11.44%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=131072 type='utf' benchmarker='wrk'                 -3.87 %       ±7.83% ±10.89% ±15.19%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=262144 type='asc' benchmarker='wrk'                  0.35 %      ±12.36% ±16.95% ±23.12%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=262144 type='buf' benchmarker='wrk'                 -4.46 %      ±10.36% ±14.25% ±19.53%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=262144 type='utf' benchmarker='wrk'                 -0.09 %       ±8.18% ±11.21% ±15.28%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=65536 type='asc' benchmarker='wrk'                  -0.09 %       ±5.98%  ±8.20% ±11.18%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=65536 type='buf' benchmarker='wrk'                   0.66 %       ±4.85%  ±6.64%  ±9.05%
http/end-vs-write-end.jsduration=5 method='write' c=100 len=65536 type='utf' benchmarker='wrk'                  -2.72 %       ±6.18%  ±8.48% ±11.58%
http/headers.jsduration=5 len=1 n=10 benchmarker='wrk'                                                          -3.62 %      ±10.68% ±14.72% ±20.24%
http/headers.jsduration=5 len=1 n=600 benchmarker='wrk'                                                          0.77 %       ±8.41% ±11.57% ±15.86%
http/headers.jsduration=5 len=100 n=10 benchmarker='wrk'                                                         1.75 %       ±7.70% ±10.55% ±14.37%
http/headers.jsduration=5 len=100 n=600 benchmarker='wrk'                                                 *     -5.90 %       ±4.88%  ±6.75%  ±9.34%
http/http_server_for_chunky_client.jstype='send' n=2000 len=1                                                   -3.10 %       ±5.94%  ±8.15% ±11.12%
http/http_server_for_chunky_client.jstype='send' n=2000 len=128                                                 -0.65 %      ±17.23% ±23.61% ±32.17%
http/http_server_for_chunky_client.jstype='send' n=2000 len=16                                                   0.73 %      ±12.54% ±17.26% ±23.66%
http/http_server_for_chunky_client.jstype='send' n=2000 len=32                                                   6.50 %      ±12.66% ±17.35% ±23.64%
http/http_server_for_chunky_client.jstype='send' n=2000 len=4                                                   -2.55 %      ±15.35% ±21.04% ±28.67%
http/http_server_for_chunky_client.jstype='send' n=2000 len=64                                                   4.15 %      ±16.23% ±22.25% ±30.34%
http/http_server_for_chunky_client.jstype='send' n=2000 len=8                                                   11.40 %      ±14.46% ±19.81% ±26.99%
http/http_server_for_chunky_client.jstype='send' n=5 len=1                                                      -3.91 %       ±7.70% ±10.82% ±15.33%
http/http_server_for_chunky_client.jstype='send' n=5 len=128                                                    -1.48 %      ±10.35% ±14.24% ±19.53%
http/http_server_for_chunky_client.jstype='send' n=5 len=16                                                     14.65 %      ±24.67% ±35.19% ±51.15%
http/http_server_for_chunky_client.jstype='send' n=5 len=32                                                     -9.88 %      ±11.13% ±15.72% ±22.50%
http/http_server_for_chunky_client.jstype='send' n=5 len=4                                                       4.55 %      ±11.31% ±15.54% ±21.26%
http/http_server_for_chunky_client.jstype='send' n=5 len=64                                                      2.71 %       ±9.47% ±13.02% ±17.84%
http/http_server_for_chunky_client.jstype='send' n=5 len=8                                                       4.19 %      ±12.00% ±16.50% ±22.59%
http/http_server_for_chunky_client.jstype='send' n=50 len=1                                                      5.45 %       ±8.47% ±11.67% ±16.04%
http/http_server_for_chunky_client.jstype='send' n=50 len=128                                                   -1.98 %       ±9.65% ±13.41% ±18.66%
http/http_server_for_chunky_client.jstype='send' n=50 len=16                                                    -1.43 %       ±8.62% ±11.91% ±16.43%
http/http_server_for_chunky_client.jstype='send' n=50 len=32                                                    -3.40 %      ±10.52% ±14.59% ±20.26%
http/http_server_for_chunky_client.jstype='send' n=50 len=4                                                      0.06 %      ±12.30% ±17.20% ±24.20%
http/http_server_for_chunky_client.jstype='send' n=50 len=64                                                     2.84 %       ±5.22%  ±7.16%  ±9.75%
http/http_server_for_chunky_client.jstype='send' n=50 len=8                                                     -3.83 %       ±6.56%  ±8.99% ±12.26%
http/http_server_for_chunky_client.jstype='send' n=500 len=1                                                     4.69 %      ±11.49% ±15.92% ±22.09%
http/http_server_for_chunky_client.jstype='send' n=500 len=128                                            *     10.96 %      ±10.36% ±14.20% ±19.34%
http/http_server_for_chunky_client.jstype='send' n=500 len=16                                                    0.21 %       ±9.45% ±12.96% ±17.70%
http/http_server_for_chunky_client.jstype='send' n=500 len=32                                                    6.23 %       ±7.43% ±10.25% ±14.10%
http/http_server_for_chunky_client.jstype='send' n=500 len=4                                                     4.52 %      ±11.19% ±15.33% ±20.89%
http/http_server_for_chunky_client.jstype='send' n=500 len=64                                             *      8.11 %       ±8.06% ±11.06% ±15.11%
http/http_server_for_chunky_client.jstype='send' n=500 len=8                                                    -2.75 %       ±7.68% ±10.54% ±14.41%
http/incoming_headers.jsduration=5 w=0 headers=20 connections=50 benchmarker='wrk'                               5.09 %       ±7.44% ±10.21% ±13.93%
http/incoming_headers.jsduration=5 w=6 headers=20 connections=50 benchmarker='wrk'                               2.83 %       ±9.16% ±12.60% ±17.27%
http/set_header.jsn=1000000 value='Connection'                                                            *     -3.74 %       ±3.52%  ±4.96%  ±7.08%
http/set_header.jsn=1000000 value='Content-Length'                                                              -1.04 %       ±2.22%  ±3.07%  ±4.23%
http/set_header.jsn=1000000 value='Content-Type'                                                                -0.62 %       ±2.26%  ±3.11%  ±4.25%
http/set_header.jsn=1000000 value='Set-Cookie'                                                                   0.18 %       ±2.10%  ±2.88%  ±3.93%
http/set_header.jsn=1000000 value='Transfer-Encoding'                                                            1.84 %       ±4.42%  ±6.25%  ±8.97%
http/set_header.jsn=1000000 value='Vary'                                                                        -1.02 %       ±2.28%  ±3.13%  ±4.27%
http/set_header.jsn=1000000 value='X-Powered-By'                                                                -0.25 %       ±2.65%  ±3.64%  ±4.98%
http/set-header.jsduration=5 res='normal' benchmarker='wrk'                                               *      7.78 %       ±6.66%  ±9.38% ±13.33%
http/set-header.jsduration=5 res='setHeader' benchmarker='wrk'                                                  -6.28 %       ±7.00%  ±9.63% ±13.22%
http/set-header.jsduration=5 res='setHeaderWH' benchmarker='wrk'                                                -0.20 %       ±4.59%  ±6.30%  ±8.59%

@aduh95
Copy link
Contributor Author

aduh95 commented Jan 30, 2021

Benchmark CI (http/upgrade): https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/921/

EDIT: Results didn't show any significant change either.

                      confidence improvement accuracy (*)   (**)   (***)
http/upgrade.jsn=1000                 4.46 %       ±7.19% ±9.57% ±12.46%
http/upgrade.jsn=5                    3.69 %       ±4.36% ±5.84%  ±7.67%

PR-URL: nodejs#37124
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott
Copy link
Member

Trott commented Feb 1, 2021

Landed in 4a113be

@Trott Trott merged commit 4a113be into nodejs:master Feb 1, 2021
@aduh95 aduh95 deleted the http-array-iteration branch February 1, 2021 14:05
targos pushed a commit that referenced this pull request Feb 2, 2021
PR-URL: #37124
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@targos targos mentioned this pull request Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants