diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 6162f347e..c205e5a08 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -67,7 +67,7 @@ jobs: - run: dotnet --info - uses: actions/setup-dotnet@v3 with: - dotnet-version: "8.x" + dotnet-version: "9.x" - name: Install run: | echo '# placeholder' > $PROFILE @@ -254,7 +254,7 @@ jobs: - run: lscpu - uses: actions/setup-dotnet@v3 with: - dotnet-version: "8.x" + dotnet-version: "9.x" - name: Install run: | dotnet --info diff --git a/.github/zig.sh b/.github/zig.sh index 679d6caa1..0827236ef 100755 --- a/.github/zig.sh +++ b/.github/zig.sh @@ -1,4 +1,4 @@ #!/usr/bin/sh -sudo snap install zig --classic --edge +sudo snap install zig --classic --beta zig version diff --git a/bench/algorithm/binarytrees/1.v b/bench/algorithm/binarytrees/1.v index d46b1c4b1..980e05cbf 100644 --- a/bench/algorithm/binarytrees/1.v +++ b/bench/algorithm/binarytrees/1.v @@ -22,12 +22,12 @@ fn check(node &Node) int { fn create(n int) &Node { if n == 0 { return &Node{ - left: 0 - right: 0 + left: unsafe { nil } + right: unsafe { nil } } } return &Node{ - left: create(n - 1) + left: create(n - 1) right: create(n - 1) } } diff --git a/bench/algorithm/edigits/1.v b/bench/algorithm/edigits/1.v index e022360c8..de5de7eef 100644 --- a/bench/algorithm/edigits/1.v +++ b/bench/algorithm/edigits/1.v @@ -5,10 +5,8 @@ import strconv import math.big import math -const ( - one = big.integer_from_int(1) - ten = big.integer_from_int(10) -) +const one = big.integer_from_int(1) +const ten = big.integer_from_int(10) fn main() { mut n := 27 diff --git a/bench/algorithm/fannkuch-redux/2-m.zig b/bench/algorithm/fannkuch-redux/2-m.zig index 5c539c36b..0067619e6 100644 --- a/bench/algorithm/fannkuch-redux/2-m.zig +++ b/bench/algorithm/fannkuch-redux/2-m.zig @@ -114,8 +114,8 @@ fn pfannkuchenStats(first: usize, last: usize, n: u8, res: *Stats) void { stats.checksum += @as(i32, @intCast(flips)) * parity; perm = nextPermutation(perm, count[0..n]) orelse break; } - _ = @atomicRmw(u32, &res.max_flips, .Max, stats.max_flips, .SeqCst); - _ = @atomicRmw(i32, &res.checksum, .Add, stats.checksum, .SeqCst); + _ = @atomicRmw(u32, &res.max_flips, .Max, stats.max_flips, .seq_cst); + _ = @atomicRmw(i32, &res.checksum, .Add, stats.checksum, .seq_cst); } pub fn main() !void { diff --git a/bench/algorithm/fasta/1c.rs b/bench/algorithm/fasta/1c.rs index 5c32efeb7..356f6b0f8 100644 --- a/bench/algorithm/fasta/1c.rs +++ b/bench/algorithm/fasta/1c.rs @@ -5,8 +5,6 @@ // contributed by TeXitoi // add compile-time calculation by hanabi1224 -#![feature(const_fn_floating_point_arithmetic)] - use std::cmp::min; use std::io::{self, BufWriter, Write}; diff --git a/bench/algorithm/fasta/5c-m.rs b/bench/algorithm/fasta/5c-m.rs index 99c621294..d458d0c53 100644 --- a/bench/algorithm/fasta/5c-m.rs +++ b/bench/algorithm/fasta/5c-m.rs @@ -11,8 +11,6 @@ // * cleaned up code a bit (reordering, renaming, formatting, etc.) // add compile-time calculation by hanabi1224 -#![feature(const_fn_floating_point_arithmetic)] - use std::cmp::min; use std::io; use std::io::{BufWriter, ErrorKind, Write}; diff --git a/bench/algorithm/http-server/1-http2.ts b/bench/algorithm/http-server/1-http2.ts index efee4c9d3..35bf7f840 100644 --- a/bench/algorithm/http-server/1-http2.ts +++ b/bench/algorithm/http-server/1-http2.ts @@ -43,8 +43,8 @@ async function main() { const server = Deno.listenTls({ hostname: hostname, port: port, - certFile: "testcert.pem", - keyFile: "testkey.pem", + cert: Deno.readTextFileSync("testcert.pem"), + key: Deno.readTextFileSync("testkey.pem"), alpnProtocols: ["h2"], }); runServerAsync(server); diff --git a/bench/algorithm/json-serde/1.v b/bench/algorithm/json-serde/1.v index b8558d43f..34a2a1378 100644 --- a/bench/algorithm/json-serde/1.v +++ b/bench/algorithm/json-serde/1.v @@ -19,12 +19,12 @@ fn main() { } struct GeoData { - t string [json: 'type'] + t string @[json: 'type'] features []Feature } struct Feature { - t string [json: 'type'] + t string @[json: 'type'] properties Properties geometry Geometry } @@ -34,6 +34,6 @@ struct Properties { } struct Geometry { - t string [json: 'type'] + t string @[json: 'type'] coordinates [][][]f64 } diff --git a/bench/algorithm/lru/1.v b/bench/algorithm/lru/1.v index a953d23f4..4f0b49160 100644 --- a/bench/algorithm/lru/1.v +++ b/bench/algorithm/lru/1.v @@ -3,11 +3,9 @@ module main import os import strconv -const ( - a = u32(1103515245) - c = u32(12345) - m = u32(1) << 31 -) +const a = u32(1103515245) +const c = u32(12345) +const m = u32(1) << 31 struct LCG { mut: @@ -63,7 +61,7 @@ fn main() { } mut lru := LRU{ size: size - m: {} + m: {} } mut hit := 0 diff --git a/bench/algorithm/lru/2.v b/bench/algorithm/lru/2.v index 5fdcab0ff..31d3f034b 100644 --- a/bench/algorithm/lru/2.v +++ b/bench/algorithm/lru/2.v @@ -3,11 +3,9 @@ module main import os import strconv -const ( - a = u32(1103515245) - c = u32(12345) - m = u32(1) << 31 -) +const a = u32(1103515245) +const c = u32(12345) +const m = u32(1) << 31 struct LCG { mut: @@ -91,7 +89,7 @@ struct LRU[K, V] { size int mut: _key_lookup map[K]&LinkedListNode[Pair[K, V]] = {} - _entries LinkedList[Pair[K, V]] = {} + _entries LinkedList[Pair[K, V]] = {} } fn (mut lru LRU) get(key u32) ?u32 { diff --git a/bench/algorithm/nbody/1.v b/bench/algorithm/nbody/1.v index 1bfe5a0ea..b21d4ae83 100644 --- a/bench/algorithm/nbody/1.v +++ b/bench/algorithm/nbody/1.v @@ -3,11 +3,9 @@ import math import strconv import os -const ( - solar_mass = 4.0 * math.pi * math.pi - days_per_year = 365.24 - c_n = 5 -) +const solar_mass = 4.0 * math.pi * math.pi +const days_per_year = 365.24 +const c_n = 5 struct Body { pub mut: diff --git a/bench/algorithm/nbody/2.rs b/bench/algorithm/nbody/2.rs index 9221a84c2..ea57bba0a 100644 --- a/bench/algorithm/nbody/2.rs +++ b/bench/algorithm/nbody/2.rs @@ -5,7 +5,7 @@ // contributed by TeXitoi // modified by hanabi1224 to use numeric_array, remove borrow checker hack, do not derive copy, more compile time calculation -use generic_array::{arr, typenum::consts::U4}; +use generic_array::typenum::consts::U4; use numeric_array::{geometry::Geometric, narr, NumericArray, NumericConstant}; use std::f64::consts::PI; @@ -18,19 +18,17 @@ const N_BODIES: usize = 5; const ADVANCE_DT: F64c = NumericConstant(0.01); macro_rules! planet { - ($x:expr, $y:expr, $z:expr, $vx:expr, $vy:expr, $vz:expr, $mass_ratio:expr) => { - { - let mass = $mass_ratio * SOLAR_MASS; - Planet { - position: narr![f64; $x, $y, $z, 0.0], - velocity: narr![f64; $vx, $vy, $vz, 0.0], - mass_ratio: NumericConstant($mass_ratio), - mass, - massc: NumericConstant(mass), - mass_half: mass * 0.5, - } + ($x:expr, $y:expr, $z:expr, $vx:expr, $vy:expr, $vz:expr, $mass_ratio:expr) => {{ + let mass = $mass_ratio * SOLAR_MASS; + Planet { + position: narr![$x, $y, $z, 0.0], + velocity: narr![$vx, $vy, $vz, 0.0], + mass_ratio: NumericConstant($mass_ratio), + mass, + massc: NumericConstant(mass), + mass_half: mass * 0.5, } - }; + }}; } lazy_static::lazy_static! { @@ -132,7 +130,7 @@ fn energy(bodies: &[Planet; N_BODIES]) -> f64 { #[inline] fn offset_momentum(bodies: &mut [Planet; N_BODIES]) { - let mut p = narr!(f64; 0, 0, 0, 0); + let mut p = narr!(0_f64, 0_f64, 0_f64, 0_f64); for bi in bodies.iter() { p -= bi.velocity * bi.mass_ratio; } diff --git a/bench/algorithm/nbody/2.zig b/bench/algorithm/nbody/2.zig index ba0be7c9f..5c1208b8e 100644 --- a/bench/algorithm/nbody/2.zig +++ b/bench/algorithm/nbody/2.zig @@ -32,7 +32,7 @@ const Body = struct { }; fn offset_momentum(bodies: []Body) void { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); var pos = vec3{ 0, 0, 0 }; for (bodies) |b| pos += scale(b.vel, b.mass); var sun = &bodies[0]; @@ -40,7 +40,7 @@ fn offset_momentum(bodies: []Body) void { } fn advance(bodies: []Body, dt: f64) void { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); for (bodies[0..], 0..) |*bi, i| { var vel = bi.vel; const mi = bi.mass; @@ -60,7 +60,7 @@ fn advance(bodies: []Body, dt: f64) void { } fn energy(bodies: []const Body) f64 { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); var e: f64 = 0.0; for (bodies, 0..) |bi, i| { e += 0.5 * length_sq(bi.vel) * bi.mass; diff --git a/bench/algorithm/pidigits/2.v b/bench/algorithm/pidigits/2.v index ef2da8843..51b74780b 100644 --- a/bench/algorithm/pidigits/2.v +++ b/bench/algorithm/pidigits/2.v @@ -5,14 +5,12 @@ import strconv import math.big import strings -const ( - zero = big.integer_from_int(0) - one = big.integer_from_int(1) - two = big.integer_from_int(2) - three = big.integer_from_int(3) - four = big.integer_from_int(4) - ten = big.integer_from_int(10) -) +const zero = big.integer_from_int(0) +const one = big.integer_from_int(1) +const two = big.integer_from_int(2) +const three = big.integer_from_int(3) +const four = big.integer_from_int(4) +const ten = big.integer_from_int(10) fn main() { mut n := 27 diff --git a/bench/algorithm/regex-redux/1.v b/bench/algorithm/regex-redux/1.v index 3009cb527..a4ae52cc7 100644 --- a/bench/algorithm/regex-redux/1.v +++ b/bench/algorithm/regex-redux/1.v @@ -21,7 +21,7 @@ fn main() { 'agggta[cgt]a|t[acg]taccct', 'agggtaa[cgt]|[acg]ttaccct', ] { - println('${p} ${var_find(content, p)?}') + println('${p} ${var_find(content, p)!}') } for p, r in { 'tHa[Nt]': '<4>' diff --git a/bench/algorithm/spectral-norm/1.rs b/bench/algorithm/spectral-norm/1.rs index f39e99f80..71674a244 100644 --- a/bench/algorithm/spectral-norm/1.rs +++ b/bench/algorithm/spectral-norm/1.rs @@ -10,8 +10,6 @@ // contributed by Ryohei Machida // modified to single thread version by hanabi1224 -#[macro_use] -extern crate generic_array; #[macro_use] extern crate numeric_array; @@ -79,7 +77,7 @@ where let ix4 = I32x4::splat(4 * i + k); // column indices of A (equivarent to indices of v) - let mut jx4 = narr![i32; 0, 1, 2, 3]; + let mut jx4 = narr![0, 1, 2, 3]; let mut sum = F64x4::default(); // Each slot in the pair gets its own sum, which is further computed in @@ -102,7 +100,12 @@ fn inv_a(i: I32x4, j: I32x4) -> F64x4 { let one = nconstant!(1); let two = nconstant!(2); let a_ij = (i + j) * (i + j + one) / two + i + one; - narr![f64; a_ij[0] as f64, a_ij[1] as f64, a_ij[2] as f64, a_ij[3] as f64] + narr![ + a_ij[0] as f64, + a_ij[1] as f64, + a_ij[2] as f64, + a_ij[3] as f64 + ] } /// Vectorised form of inner product diff --git a/bench/algorithm/spectral-norm/2-m.zig b/bench/algorithm/spectral-norm/2-m.zig index 68acd9efb..8769bfed0 100644 --- a/bench/algorithm/spectral-norm/2-m.zig +++ b/bench/algorithm/spectral-norm/2-m.zig @@ -17,12 +17,12 @@ fn runInParallel(tasks: []std.Thread, len: usize, comptime f: anytype, args: any } fn baseIdx(i: vec4) vec4 { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); return i * (i + vec1to4(1)) * vec1to4(0.5) + vec1to4(1); } fn multAvGeneric(comptime transpose: bool, first: usize, dst: []vec4, src: []const vec4) void { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); const srcVals = std.mem.bytesAsSlice(f64, std.mem.sliceAsBytes(src)); var ti = vec1to4(@as(f64, @floatFromInt(first * 4))) + if (transpose) vec4{ 1, 2, 3, 4 } else vec4{ 0, 1, 2, 3 }; for (dst) |*res| { @@ -56,15 +56,15 @@ fn setOnes(first: usize, last: usize, dst: []vec4) void { } fn aggregateResults(first: usize, last: usize, u: []const vec4, v: []const vec4, total_vbv: *f64, total_vv: *f64) void { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); var vbv = vec1to4(0); var vv = vec1to4(0); for (v[first..last], 0..) |f, i| { vbv += u[first + i] * f; vv += f * f; } - _ = @atomicRmw(f64, total_vbv, .Add, @reduce(.Add, vbv), .SeqCst); - _ = @atomicRmw(f64, total_vv, .Add, @reduce(.Add, vv), .SeqCst); + _ = @atomicRmw(f64, total_vbv, .Add, @reduce(.Add, vbv), .seq_cst); + _ = @atomicRmw(f64, total_vv, .Add, @reduce(.Add, vv), .seq_cst); } pub fn main() !void { diff --git a/bench/algorithm/spectral-norm/2.zig b/bench/algorithm/spectral-norm/2.zig index e90d0db83..653cbe8ce 100644 --- a/bench/algorithm/spectral-norm/2.zig +++ b/bench/algorithm/spectral-norm/2.zig @@ -6,12 +6,12 @@ fn vec1to4(f: f64) vec4 { } fn baseIdx(i: vec4) vec4 { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); return i * (i + vec1to4(1)) * vec1to4(0.5) + vec1to4(1); } fn multAvGeneric(comptime transpose: bool, dst: []vec4, src: []const vec4) void { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); const srcVals = std.mem.bytesAsSlice(f64, std.mem.sliceAsBytes(src)); var ti = if (transpose) vec4{ 1, 2, 3, 4 } else vec4{ 0, 1, 2, 3 }; for (dst) |*res| { @@ -41,7 +41,7 @@ fn multAtAv(dest: []vec4, src: []const vec4, temp: []vec4) void { } fn aggregateResults(u: []const vec4, v: []const vec4) f64 { - @setFloatMode(.Optimized); + @setFloatMode(.optimized); var vbv = vec1to4(0); var vv = vec1to4(0); for (v, 0..) |f, i| { diff --git a/bench/algorithm/spectral-norm/7-m.rs b/bench/algorithm/spectral-norm/7-m.rs index 198029a61..f1fcdfff7 100644 --- a/bench/algorithm/spectral-norm/7-m.rs +++ b/bench/algorithm/spectral-norm/7-m.rs @@ -9,8 +9,6 @@ // contributed by Andre Bogus // contributed by Ryohei Machida -#[macro_use] -extern crate generic_array; #[macro_use] extern crate numeric_array; @@ -79,7 +77,7 @@ where let ix4 = I32x4::splat(4 * i + k); // column indices of A (equivarent to indices of v) - let mut jx4 = narr![i32; 0, 1, 2, 3]; + let mut jx4 = narr![0, 1, 2, 3]; let mut sum = F64x4::default(); // Each slot in the pair gets its own sum, which is further computed in @@ -102,7 +100,12 @@ fn inv_a(i: I32x4, j: I32x4) -> F64x4 { let one = nconstant!(1); let two = nconstant!(2); let a_ij = (i + j) * (i + j + one) / two + i + one; - narr![f64; a_ij[0] as f64, a_ij[1] as f64, a_ij[2] as f64, a_ij[3] as f64] + narr![ + a_ij[0] as f64, + a_ij[1] as f64, + a_ij[2] as f64, + a_ij[3] as f64 + ] } /// Vectorised form of inner product diff --git a/bench/algorithm/spectral-norm/7.rs b/bench/algorithm/spectral-norm/7.rs index 1e3b7ef2e..f9d9d7b9a 100644 --- a/bench/algorithm/spectral-norm/7.rs +++ b/bench/algorithm/spectral-norm/7.rs @@ -10,8 +10,6 @@ // contributed by Ryohei Machida // removed parallelization -#[macro_use] -extern crate generic_array; #[macro_use] extern crate numeric_array; @@ -76,7 +74,7 @@ where let ix4 = I32x4::splat(4 * i + k); // column indices of A (equivarent to indices of v) - let mut jx4 = narr![i32; 0, 1, 2, 3]; + let mut jx4 = narr![0, 1, 2, 3]; let mut sum = F64x4::default(); // Each slot in the pair gets its own sum, which is further computed in @@ -98,7 +96,12 @@ fn inv_a(i: I32x4, j: I32x4) -> F64x4 { let one = nconstant!(1); let two = nconstant!(2); let a_ij = (i + j) * (i + j + one) / two + i + one; - narr![f64; a_ij[0] as f64, a_ij[1] as f64, a_ij[2] as f64, a_ij[3] as f64] + narr![ + a_ij[0] as f64, + a_ij[1] as f64, + a_ij[2] as f64, + a_ij[3] as f64 + ] } /// Vectorised form of inner product diff --git a/bench/bench_csharp.yaml b/bench/bench_csharp.yaml index ec9f4dcb6..affccd215 100644 --- a/bench/bench_csharp.yaml +++ b/bench/bench_csharp.yaml @@ -73,13 +73,13 @@ source_rename_to: app.cs environments: - os: linux compiler: dotnet - version: 8 + version: 9 compiler_version_command: dotnet --version - docker: mcr.microsoft.com/dotnet/sdk:8.0 + docker: mcr.microsoft.com/dotnet/sdk:9.0 # docker_volumns: # - /tmp/.nuget/packages:/root/.nuget/packages include: dotnet - build: dotnet publish -c Release -r linux-x64 -f net8 --self-contained true -p:PublishSingleFile=true -o pub # -p:PublishReadyToRun=true + build: dotnet publish -c Release -r linux-x64 -f net9 --self-contained true -p:PublishSingleFile=true -o pub # -p:PublishReadyToRun=true after_build: - mv pub/app out out_dir: out diff --git a/bench/bench_csharp_native_aot.yaml b/bench/bench_csharp_native_aot.yaml index dbd22f9ec..f434fbfa4 100644 --- a/bench/bench_csharp_native_aot.yaml +++ b/bench/bench_csharp_native_aot.yaml @@ -61,10 +61,10 @@ source_rename_to: app.cs environments: - os: linux compiler: dotnet/aot - version: 8 + version: 9 compiler_version_command: dotnet --version include: dotnet - build: dotnet publish -c Release -r linux-x64 -f net8 -p:PublishAot=true -o pub + build: dotnet publish -c Release -r linux-x64 -f net9 -p:PublishAot=true -o pub after_build: - mv pub/app out out_dir: out diff --git a/bench/bench_csharp_preview.yaml b/bench/bench_csharp_preview.yaml index a75a858e7..b3bc54b18 100644 --- a/bench/bench_csharp_preview.yaml +++ b/bench/bench_csharp_preview.yaml @@ -71,12 +71,12 @@ source_rename_to: app.cs environments: - os: linux compiler: dotnet - version: 7 + version: 10 compiler_version_command: dotnet --version - docker: mcr.microsoft.com/dotnet/sdk:7.0 + docker: mcr.microsoft.com/dotnet/sdk:10.0 # docker_volumns: # - /tmp/.nuget/packages:/root/.nuget/packages include: dotnet_preview - build: dotnet publish -c Release -r linux-x64 -f net7 --self-contained true -p:PublishSingleFile=true -o out # -p:PublishReadyToRun=true + build: dotnet publish -c Release -r linux-x64 -f net10 --self-contained true -p:PublishSingleFile=true -o out # -p:PublishReadyToRun=true out_dir: out run_cmd: app diff --git a/bench/bench_go_ffi.yaml b/bench/bench_go_ffi.yaml index f46ce5275..a6bb0de80 100644 --- a/bench/bench_go_ffi.yaml +++ b/bench/bench_go_ffi.yaml @@ -12,7 +12,7 @@ environments: - os: linux compiler: go version: latest - docker: golang:1.21 + docker: golang:1.23 env: GOAMD64: v3 # https://github.com/golang/go/wiki/MinimumRequirements#amd64 include: go diff --git a/bench/bench_rust.yaml b/bench/bench_rust.yaml index f5889baf5..5318e977e 100644 --- a/bench/bench_rust.yaml +++ b/bench/bench_rust.yaml @@ -29,7 +29,9 @@ problems: - name: fasta source: - 1.rs + - 1c.rs - 5-m.rs + - 5c-m.rs - name: knucleotide source: - 8.rs diff --git a/bench/bench_rust_nightly.yaml b/bench/bench_rust_nightly.yaml index 41904826b..0f8b68297 100644 --- a/bench/bench_rust_nightly.yaml +++ b/bench/bench_rust_nightly.yaml @@ -6,10 +6,6 @@ problems: - name: mandelbrot source: - 9.rs - - name: fasta - source: - - 1c.rs - - 5c-m.rs - name: nbody source: - 3.rs diff --git a/bench/bench_typescript_deno.yaml b/bench/bench_typescript_deno.yaml index 4ab146c41..ba2aa5d3c 100644 --- a/bench/bench_typescript_deno.yaml +++ b/bench/bench_typescript_deno.yaml @@ -52,7 +52,7 @@ environments: include: typescript include_sub_dir: # before_build: - build: deno bundle --unstable c.ts app.ts && deno compile --no-check --allow-all --unsafely-ignore-certificate-errors=localhost --unstable -o out/app app.ts + build: deno run --allow-all esbuild.mjs && deno compile --no-check --allow-all --unsafely-ignore-certificate-errors=localhost --unstable -o out/app app.ts after_build: - cp testcert.pem out - cp testkey.pem out diff --git a/bench/bench_v.yaml b/bench/bench_v.yaml index 70f2ebbab..5dab1482e 100644 --- a/bench/bench_v.yaml +++ b/bench/bench_v.yaml @@ -43,7 +43,7 @@ problems: - 1.v - name: http-server source: - - 1.v + # - 1.v - name: regex-redux source: - 1.v diff --git a/bench/bench_v_autofree.yaml b/bench/bench_v_autofree.yaml index 78b9ee044..c76ecb0da 100644 --- a/bench/bench_v_autofree.yaml +++ b/bench/bench_v_autofree.yaml @@ -43,7 +43,7 @@ problems: - 1.v - name: http-server source: - - 1.v + # - 1.v - name: regex-redux source: # - 1.v diff --git a/bench/bench_wasm.yaml b/bench/bench_wasm.yaml index 15d9c90b0..a5c482662 100644 --- a/bench/bench_wasm.yaml +++ b/bench/bench_wasm.yaml @@ -80,11 +80,12 @@ environments: - cargo build --release --target wasm32-wasi --target-dir /tmp/rustwasm/target build: mv /tmp/rustwasm/target/wasm32-wasi/release/_app.wasm out out_dir: out - run_cmd: wasmtime run --wasm-features all _app.wasm + run_cmd: wasmtime run _app.wasm runtime_included: false - os: linux compiler: node version: latest + enabled: false compiler_version_command: runtime_version_parameter: --version include: rust-wasm @@ -99,6 +100,7 @@ environments: enabled: false compiler: deno version: latest + enabled: false compiler_version_command: deno --version runtime_version_parameter: env: diff --git a/bench/include/dotnet/app.csproj b/bench/include/dotnet/app.csproj index 146cf1cb7..31f365306 100644 --- a/bench/include/dotnet/app.csproj +++ b/bench/include/dotnet/app.csproj @@ -1,6 +1,6 @@ - net8; + net9; Exe latest true diff --git a/bench/include/dotnet_preview/app.csproj b/bench/include/dotnet_preview/app.csproj index 2116c3eff..6a5f84d55 100644 --- a/bench/include/dotnet_preview/app.csproj +++ b/bench/include/dotnet_preview/app.csproj @@ -1,6 +1,6 @@ - net8 + net10 Exe preview true diff --git a/bench/include/rust/Cargo.toml b/bench/include/rust/Cargo.toml index 8358097c2..36c0cce1d 100644 --- a/bench/include/rust/Cargo.toml +++ b/bench/include/rust/Cargo.toml @@ -6,7 +6,7 @@ version = "0.1.0" [features] default = [ "async-std", - "tokio/full", + "tokio", "flume", "async-channel", "async-executor", @@ -24,7 +24,7 @@ default = [ anyhow = "1" bitvec = "1" elliptic-curve = "0" -generic-array = "0" +generic-array = "1" hashbrown = "0" hashlink = "0" hex = "0" @@ -40,24 +40,38 @@ numeric-array = "0" rand = "0" rayon = "1" regex = "1" -serde = {version = "1", features = ["derive"]} -serde_json = {version = "1", features = ["float_roundtrip", "preserve_order"]} -simd-json = "0.13" +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1", features = ["float_roundtrip", "preserve_order"] } +simd-json = "0.14" sonic-rs = "0.3" static-rc = "0" -async-channel = {version = "2", optional = true} -async-executor = {version = "1", optional = true} -async-std = {version = "1", optional = true} -axum = {version = "0.6", optional = true, features = ["http1", "http2"]} -axum-server = {version = "0.4", optional = true, features = ["tls-rustls"]} -flume = {version = "0", optional = true} -futures-lite = {version = "2", optional = true} -hyper = {version = "0.14", optional = true, default-features = false, features = ["client", "http1", "http2"]} -hyper-rustls = {version = "0.24", optional = true, default-features = false, features = ["native-tokio", "http2"]} -rustls = {version = "0.21", optional = true, features = ["dangerous_configuration"]} -tokio = {version = "1.35", optional = true} -warp = {version = "0.3", optional = true, features = ["tls"]} +async-channel = { version = "2", optional = true } +async-executor = { version = "1", optional = true } +async-std = { version = "1", optional = true } +axum = { version = "0.6", optional = true, features = ["http1", "http2"] } +axum-server = { version = "0.5", optional = true, features = ["tls-rustls"] } +flume = { version = "0", optional = true } +futures-lite = { version = "2", optional = true } +hyper = { version = "0.14", optional = true, default-features = false, features = [ + "client", + "http1", + "http2", +] } +hyper-rustls = { version = "0.24", optional = true, default-features = false, features = [ + "native-tokio", + "http2", +] } +rustls = { version = "0.21", optional = true, features = [ + "dangerous_configuration", +] } +tokio = { version = "1", features = [ + "macros", + "rt", + "rt-multi-thread", + "sync", +], optional = true } +warp = { version = "0.3", optional = true, features = ["tls"] } [profile.release] codegen-units = 1 diff --git a/bench/include/typescript/.gitignore b/bench/include/typescript/.gitignore index 74aac2a01..813f34ae1 100644 --- a/bench/include/typescript/.gitignore +++ b/bench/include/typescript/.gitignore @@ -1,2 +1,3 @@ !.gitignore !*.pem +!esbuild.mjs diff --git a/bench/include/typescript/esbuild.mjs b/bench/include/typescript/esbuild.mjs new file mode 100644 index 000000000..419f55d45 --- /dev/null +++ b/bench/include/typescript/esbuild.mjs @@ -0,0 +1,12 @@ +import * as esbuild from "npm:esbuild"; +import { denoPlugins } from "jsr:@luca/esbuild-deno-loader"; + +const result = await esbuild.build({ + plugins: [...denoPlugins()], + entryPoints: ["c.ts"], + outfile: "app.ts", + bundle: true, + format: "esm", +}); + +esbuild.stop(); diff --git a/bench/include/zig/build.zig b/bench/include/zig/build.zig index d24efbfca..4fc3ec1f1 100644 --- a/bench/include/zig/build.zig +++ b/bench/include/zig/build.zig @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void { const exe = b.addExecutable(.{ .name = "app", - .root_source_file = .{ .path = "app.zig" }, + .root_source_file = b.path("app.zig"), .target = target, .optimize = std.builtin.Mode.ReleaseFast, }); diff --git a/bench/tool/BenchTool.csproj b/bench/tool/BenchTool.csproj index 0c1c7612b..621edaa95 100644 --- a/bench/tool/BenchTool.csproj +++ b/bench/tool/BenchTool.csproj @@ -1,6 +1,6 @@  - net8 + net9 Exe true latest diff --git a/bench/tool/Program.cs b/bench/tool/Program.cs index 2bd357c98..d5535385e 100644 --- a/bench/tool/Program.cs +++ b/bench/tool/Program.cs @@ -111,13 +111,13 @@ public static async Task Main( if (s_cpuInfo != null) { Logger.Info($"CPU: {s_cpuInfo}"); - if (task == TASK_CHECK_CPU && s_cpuInfo.Model < 80) - { - // To print cpu features, use - // either: 'rustc +nightly --print=cfg -C target-cpu=broadwell' (features like avx512 are missing from stable) - // or 'zig build -Dcpu=broadwell --verbose-llvm-cpu-features' - throw new Exception("[github action] Fail intentionally on old cpu model prior to broadwell, please retry."); - } + // if (task == TASK_CHECK_CPU && s_cpuInfo.Model < 80) + // { + // // To print cpu features, use + // // either: 'rustc +nightly --print=cfg -C target-cpu=broadwell' (features like avx512 are missing from stable) + // // or 'zig build -Dcpu=broadwell --verbose-llvm-cpu-features' + // throw new Exception("[github action] Fail intentionally on old cpu model prior to broadwell, please retry."); + // } } if (task == TASK_CHECK_CPU) {