Skip to content

Commit 3976bd1

Browse files
authored
Merge branch 'main' into faster-csharp-http-server
2 parents cc2c43f + 0a30fb0 commit 3976bd1

File tree

12 files changed

+34
-23
lines changed

12 files changed

+34
-23
lines changed

.github/workflows/bench.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
runs-on: ${{ matrix.os }}
2121
strategy:
2222
fail-fast: true
23+
# fail-fast: false
2324
matrix:
2425
os: [ubuntu-22.04]
2526
lang: [
@@ -227,10 +228,10 @@ jobs:
227228
pushd bench
228229
dotnet run -c Release --project tool -- --task test --langs ${{ matrix.lang }}
229230
popd
230-
- uses: actions/upload-artifact@v3
231+
- uses: actions/upload-artifact@v4
231232
if: github.ref == 'refs/heads/main'
232233
with:
233-
name: build
234+
name: build-${{ matrix.lang }}
234235
path: bench/build/**/*
235236
if-no-files-found: error
236237
gate:
@@ -302,9 +303,10 @@ jobs:
302303
with:
303304
ruby-version: 3 # Not needed with a .ruby-version file
304305
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
305-
- uses: actions/download-artifact@v3
306+
- uses: actions/download-artifact@v4
306307
with:
307-
name: build
308+
pattern: build-*
309+
merge-multiple: true
308310
path: bench/build/
309311
- name: Bench
310312
run: |
@@ -313,7 +315,7 @@ jobs:
313315
dotnet run -c Release --project tool -- --task test --ignore-missing
314316
dotnet run -c Release --project tool -- --task bench --ignore-missing
315317
popd
316-
- uses: actions/upload-artifact@v3
318+
- uses: actions/upload-artifact@v4
317319
with:
318320
name: log
319321
path: bench/build/_results/**/*
@@ -333,7 +335,7 @@ jobs:
333335
- uses: pnpm/action-setup@v2
334336
with:
335337
version: 9
336-
- uses: actions/download-artifact@v3
338+
- uses: actions/download-artifact@v4
337339
with:
338340
# Artifact name
339341
name: log

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ _Current benchmarks problems and their implementations are from [The Computer La
5757

5858
## Prerequisites
5959

60-
[net7](https://dotnet.microsoft.com/)
60+
[net9](https://dotnet.microsoft.com/)
6161

6262
[nodejs 14](https://nodejs.org/)
6363

bench/algorithm/http-server/1-http2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ fn main() -> anyhow::Result<()> {
2424
.and_then(|s| s.into_string().ok())
2525
.and_then(|s| s.parse().ok())
2626
.unwrap_or(10);
27-
let mut rng = thread_rng();
28-
let port = rng.gen_range(30000..40000);
27+
let mut rng = rand::rng();
28+
let port = rng.random_range(30000..40000);
2929
tokio_main(n, port)?;
3030
std::process::exit(0);
3131
}

bench/algorithm/http-server/1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ fn main() -> anyhow::Result<()> {
1515
.and_then(|s| s.into_string().ok())
1616
.and_then(|s| s.parse().ok())
1717
.unwrap_or(10);
18-
let mut rng = thread_rng();
19-
let port = rng.gen_range(30000..40000);
18+
let mut rng = rand::rng();
19+
let port = rng.random_range(30000..40000);
2020
tokio_main(n, port)?;
2121
std::process::exit(0);
2222
}

bench/algorithm/http-server/2-http2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ fn main() -> anyhow::Result<()> {
1919
.and_then(|s| s.into_string().ok())
2020
.and_then(|s| s.parse().ok())
2121
.unwrap_or(10);
22-
let mut rng = thread_rng();
23-
let port = rng.gen_range(30000..40000);
22+
let mut rng = rand::rng();
23+
let port = rng.random_range(30000..40000);
2424
tokio_main(n, port)?;
2525
std::process::exit(0);
2626
}

bench/algorithm/http-server/2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ fn main() -> anyhow::Result<()> {
1414
.and_then(|s| s.into_string().ok())
1515
.and_then(|s| s.parse().ok())
1616
.unwrap_or(10);
17-
let mut rng = thread_rng();
18-
let port = rng.gen_range(30000..40000);
17+
let mut rng = rand::rng();
18+
let port = rng.random_range(30000..40000);
1919
tokio_main(n, port)?;
2020
std::process::exit(0);
2121
}

bench/bench_go_ffi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ environments:
1212
- os: linux
1313
compiler: go
1414
version: latest
15-
docker: golang:1.23
15+
docker: golang:1.24
1616
env:
1717
GOAMD64: v3 # https://github.com/golang/go/wiki/MinimumRequirements#amd64
1818
include: go

bench/bench_nim.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ problems:
2828
- 2.nim
2929
- name: http-server
3030
source:
31-
- 1.nim
31+
# - 1.nim
3232
- name: coro-prime-sieve
3333
source:
3434
- 1.nim

bench/bench_zig.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ problems:
1616
- name: spectral-norm
1717
source:
1818
- 1.zig
19-
- 2.zig
20-
- 2-m.zig
19+
# - 2.zig
20+
# - 2-m.zig
2121
- name: pidigits
2222
source:
2323
- 1.zig
@@ -27,7 +27,7 @@ problems:
2727
- name: fannkuch-redux
2828
source:
2929
- 1.zig
30-
- 2.zig
30+
# - 2.zig
3131
- 2-m.zig
3232
- 3-i.zig
3333
- name: fasta
@@ -63,6 +63,6 @@ environments:
6363
version: latest
6464
docker:
6565
include: zig
66-
build: zig build -Dcpu=broadwell --verbose-llvm-cpu-features
66+
build: zig build -Dcpu=broadwell # --verbose-llvm-cpu-features
6767
out_dir: zig-out/bin
6868
run_cmd: app

bench/include/rust-nightly/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ edition = "2021"
33
name = "_app"
44
version = "0.1.0"
55

6+
[workspace]
7+
resolver = "3"
8+
69
[features]
710
default = []
811

bench/include/rust-wasm/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ edition = "2021"
33
name = "_app"
44
version = "0.1.0"
55

6+
[workspace]
7+
resolver = "3"
8+
69
[features]
710
default = [
811
"wasm",

bench/include/rust/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ edition = "2021"
33
name = "_app"
44
version = "0.1.0"
55

6+
[workspace]
7+
resolver = "3"
8+
69
[features]
710
default = [
811
"async-std",
@@ -42,8 +45,8 @@ rayon = "1"
4245
regex = "1"
4346
serde = { version = "1", features = ["derive"] }
4447
serde_json = { version = "1", features = ["float_roundtrip", "preserve_order"] }
45-
simd-json = "0.14"
46-
sonic-rs = "0.3"
48+
simd-json = "0.15"
49+
sonic-rs = "0.4"
4750
static-rc = "0"
4851

4952
async-channel = { version = "2", optional = true }

0 commit comments

Comments
 (0)