Skip to content

Commit 5bb053d

Browse files
committed
enable simd by default in tests and benchmarks
1 parent 49d7508 commit 5bb053d

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

.github/workflows/bench.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
run: npm i
2121
- name: Run Benchmark
2222
run: npm run bench
23-
- name: Run simd Benchmark
24-
run: npm run bench:simd
2523

2624
benchmark_branch:
2725
name: benchmark branch
@@ -37,5 +35,3 @@ jobs:
3735
run: npm i
3836
- name: Run Benchmark
3937
run: npm run bench
40-
- name: Run simd Benchmark
41-
run: npm run bench:simd

.taprc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ coverage: true
55
expose-gc: true
66
timeout: 60
77
check-coverage: false
8+
node-arg: --experimental-wasm-simd

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,29 @@ number of unix sockets (connections) with a pipelining depth of 10.
2424

2525
### Connections 1
2626

27-
| Test | Samples | Result | Tolerance | Difference with slowest |
28-
|---------------------|---------|----------------|-----------|-------------------------|
29-
| http - no keepalive | 99 | 812 reqs/sec | ± 0.22 % | |
30-
| http - keepalive | 99 | 819 reqs/sec | ± 0.20 % | + 0.82 % |
31-
| undici - pipeline | 99 | 6632 reqs/sec | ± 0.63 % | + 716.73 % |
32-
| undici - request | 99 | 6645 reqs/sec | ± 1.34 % | + 718.34 % |
33-
| undici - stream | 99 | 7366 reqs/sec | ± 0.59 % | + 807.11 % |
34-
| undici - dispatch | 99 | 7404 reqs/sec | ± 0.37 % | + 811.76 % |
27+
| Tests | Samples | Result | Tolerance | Difference with slowest |
28+
|---------------------|---------|---------------|-----------|-------------------------|
29+
| http - no keepalive | 15 | 4.63 req/sec | ± 2.77 % | - |
30+
| http - keepalive | 10 | 4.81 req/sec | ± 2.16 % | + 3.94 % |
31+
| undici - stream | 25 | 62.22 req/sec | ± 2.67 % | + 1244.58 % |
32+
| undici - dispatch | 15 | 64.33 req/sec | ± 2.47 % | + 1290.24 % |
33+
| undici - request | 15 | 66.08 req/sec | ± 2.48 % | + 1327.88 % |
34+
| undici - pipeline | 10 | 66.13 req/sec | ± 1.39 % | + 1329.08 % |
3535

3636
### Connections 50
3737

38-
| Test | Samples | Result | Tolerance | Difference with slowest |
39-
|---------------------|---------|----------------|-----------|-------------------------|
40-
| http - no keepalive | 99 | 12968 reqs/sec | ± 1.86 % | |
41-
| http - keepalive | 99 | 14745 reqs/sec | ± 1.59 % | + 13.70 % |
42-
| undici - pipeline | 99 | 20051 reqs/sec | ± 2.34 % | + 54.62 % |
43-
| undici - stream | 100 | 26456 reqs/sec | ± 3.50 % | + 104.00 % |
44-
| undici - request | 99 | 29342 reqs/sec | ± 1.26 % | + 126.26 % |
45-
| undici - dispatch | 99 | 35323 reqs/sec | ± 0.77 % | + 172.38 % |
38+
| Tests | Samples | Result | Tolerance | Difference with slowest |
39+
|---------------------|---------|------------------|-----------|-------------------------|
40+
| http - no keepalive | 50 | 3546.49 req/sec | ± 2.90 % | - |
41+
| http - keepalive | 15 | 5692.67 req/sec | ± 2.48 % | + 60.52 % |
42+
| undici - pipeline | 25 | 8478.71 req/sec | ± 2.62 % | + 139.07 % |
43+
| undici - request | 20 | 9766.66 req/sec | ± 2.79 % | + 175.39 % |
44+
| undici - stream | 15 | 10109.74 req/sec | ± 2.94 % | + 185.06 % |
45+
| undici - dispatch | 25 | 10949.73 req/sec | ± 2.54 % | + 208.75 % |
46+
47+
#### Note
48+
49+
The benchmarks have the [simd](https://github.com/WebAssembly/simd) feature enabled.
4650

4751
## Quick Start
4852

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"build:wasm": "node build/wasm.js --docker",
3434
"lint": "standard | snazzy",
3535
"lint:fix": "standard --fix | snazzy",
36-
"test": "tap test/*.js --no-coverage && jest test/jest/test",
37-
"test:simd": "tap --node-arg=--expose-gc --node-arg=--experimental-wasm-simd test/*.js --no-coverage",
36+
"test": "tap test/*.js --no-coverage",
3837
"test:tdd": "tap test/*.js -w --no-coverage-report",
3938
"test:typescript": "tsd",
4039
"coverage": "standard | snazzy && tap test/*.js",
@@ -43,9 +42,7 @@
4342
"bench:simd": "concurrently -k -s first npm:bench:server npm:bench:run:simd",
4443
"bench:server": "node benchmarks/server.js",
4544
"prebench:run": "node benchmarks/wait.js",
46-
"prebench:run:simd": "node benchmarks/wait.js",
47-
"bench:run": "CONNECTIONS=1 node benchmarks/benchmark.js && CONNECTIONS=50 node benchmarks/benchmark.js",
48-
"bench:run:simd": "CONNECTIONS=1 node --experimental-wasm-simd benchmarks/benchmark.js && CONNECTIONS=50 node --experimental-wasm-simd benchmarks/benchmark.js",
45+
"bench:run": "CONNECTIONS=1 node --experimental-wasm-simd benchmarks/benchmark.js && CONNECTIONS=50 node --experimental-wasm-simd benchmarks/benchmark.js",
4946
"serve:website": "docsify serve .",
5047
"prepare": "husky install"
5148
},

0 commit comments

Comments
 (0)