Compare commits
17 Commits
75fdc9d3a4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db8e06d3a8 | ||
|
|
3f379b9d69 | ||
|
|
c1f2b0f3a3 | ||
|
|
7a7dc20731 | ||
|
|
9f7d6bb3b4 | ||
|
|
6e6e408a05 | ||
|
|
b6cccb7ecb | ||
|
|
8746af2882 | ||
|
|
8fb8aa15b0 | ||
|
|
b6cc306d7a | ||
|
|
12e996f7de | ||
|
|
ef1e46d8ef | ||
|
|
a0404ec851 | ||
|
|
a0e2851620 | ||
|
|
d9bbbcfbe2 | ||
|
|
f5f984c81a | ||
|
|
74873feb96 |
@@ -12,7 +12,7 @@ repository = "https://github.com/bytecodealliance/regalloc2"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = { version = "0.4.8", default-features = false }
|
log = { version = "0.4.8", default-features = false }
|
||||||
smallvec = { version = "1.6.1", features = ["union"] }
|
smallvec = { version = "1.6.1", features = ["union", "const_generics"] }
|
||||||
rustc-hash = { version = "1.1.0", default-features = false }
|
rustc-hash = { version = "1.1.0", default-features = false }
|
||||||
slice-group-by = { version = "0.3.0", default-features = false }
|
slice-group-by = { version = "0.3.0", default-features = false }
|
||||||
hashbrown = "0.13.2"
|
hashbrown = "0.13.2"
|
||||||
|
|||||||
1
bench_res/9d1dbadd0453acc9698840ddac1fb4e7671a32dc.json
Normal file
1
bench_res/9d1dbadd0453acc9698840ddac1fb4e7671a32dc.json
Normal file
File diff suppressed because one or more lines are too long
257
bench_res/dcb95541a7a16564db4b15f9248ceab990a18135.txt
Normal file
257
bench_res/dcb95541a7a16564db4b15f9248ceab990a18135.txt
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
compilation :: cycles :: benchmarks/shootout-keccak/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 82716376.00 ± 10452013.97 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 3.22x to 3.86x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[109368640 115289268.00 121224220] tmp/wasmtime_main.so
|
||||||
|
[26120680 32572892.00 38319220] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-seqhash/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 35218172.00 ± 10139196.17 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 2.64x to 3.97x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[45573440 50487252.00 57536460] tmp/wasmtime_main.so
|
||||||
|
[14076800 15269080.00 17370880] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-ed25519/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 230472644.00 ± 14955335.34 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 3.13x to 3.42x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[324059620 331874540.00 343721760] tmp/wasmtime_main.so
|
||||||
|
[92807900 101401896.00 111293420] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/bz2/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 148462916.00 ± 74415954.89 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.79x to 3.37x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[203553120 242451052.00 291165780] tmp/wasmtime_main.so
|
||||||
|
[87747740 93988136.00 99525600] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-ackermann/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 38242648.00 ± 16283101.77 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.63x to 2.56x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[68094780 73289288.00 78249120] tmp/wasmtime_main.so
|
||||||
|
[25462000 35046640.00 47911900] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/blake3-simd/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 21865932.00 ± 4836633.92 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.76x to 2.19x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[42437960 44226636.00 46472140] tmp/wasmtime_main.so
|
||||||
|
[19230460 22360704.00 25217580] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-base64/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 30766524.00 ± 8057535.50 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.71x to 2.22x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[58863940 62678716.00 64941420] tmp/wasmtime_main.so
|
||||||
|
[28483860 31912192.00 39027860] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-ctype/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 26468612.00 ± 16769880.25 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.35x to 2.54x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[44742000 54515672.00 65715120] tmp/wasmtime_main.so
|
||||||
|
[24041300 28047060.00 34958480] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-switch/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 44993524.00 ± 15374857.68 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.60x to 2.23x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[87974340 93954372.00 106466280] tmp/wasmtime_main.so
|
||||||
|
[46232300 48960848.00 51231600] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-nestedloop/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 21867216.00 ± 5291064.57 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.62x to 2.01x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[45180760 48782624.00 52403220] tmp/wasmtime_main.so
|
||||||
|
[23893540 26915408.00 29864760] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-fib2/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 21156820.00 ± 11632344.98 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.33x to 2.14x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[47489900 49865496.00 57817820] tmp/wasmtime_main.so
|
||||||
|
[20262340 28708676.00 37136600] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/blind-sig/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 206300520.00 ± 49456972.18 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.53x to 1.87x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[468801420 501884140.00 533785860] tmp/wasmtime_main.so
|
||||||
|
[280069560 295583620.00 313052880] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-random/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 17866328.00 ± 5058990.61 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.45x to 1.80x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[42136400 46350848.00 49072180] tmp/wasmtime_main.so
|
||||||
|
[26323300 28484520.00 30908400] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/regex/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 306213000.00 ± 149004995.32 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.31x to 1.89x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[737215040 814849904.00 927360140] tmp/wasmtime_main.so
|
||||||
|
[434576640 508636904.00 605740280] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-sieve/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 15761008.00 ± 9513156.34 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.23x to 1.94x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[40248860 42579220.00 45042100] tmp/wasmtime_main.so
|
||||||
|
[21795160 26818212.00 34187840] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/meshoptimizer/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 25719108.00 ± 8595140.79 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.32x to 1.64x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[75542900 79202808.00 84619440] tmp/wasmtime_main.so
|
||||||
|
[50271620 53483700.00 55800220] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-matrix/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 15708244.00 ± 10889969.92 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.14x to 1.78x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[46643700 49724296.00 53101840] tmp/wasmtime_main.so
|
||||||
|
[26710660 34016052.00 39995200] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/spidermonkey/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 2514174744.00 ± 1857722729.16 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.11x to 1.74x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[7653278120 8460320132.00 9199229920] tmp/wasmtime_main.so
|
||||||
|
[4197742280 5946145388.00 6556552620] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/pulldown-cmark/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 95998836.00 ± 94947313.64 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.00x to 1.71x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[333846840 364658356.00 438691720] tmp/wasmtime_main.so
|
||||||
|
[216037300 268659520.00 322037740] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-gimli/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 1553848.00 ± 1106236.68 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.09x to 1.53x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[5962360 6564812.00 7277160] tmp/wasmtime_main.so
|
||||||
|
[4538420 5010964.00 5912740] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-xblabla20/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 5108496.00 ± 3867184.58 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.07x to 1.53x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[20042160 22127584.00 23927120] tmp/wasmtime_main.so
|
||||||
|
[14784460 17019088.00 19205440] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-xchacha20/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 4067360.00 ± 2084422.61 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.14x to 1.43x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[17229340 18357984.00 19519960] tmp/wasmtime_main.so
|
||||||
|
[12904240 14290624.00 15326220] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/noop/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 2802768.00 ± 1567262.30 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.09x to 1.31x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[16538500 16982392.00 18070820] tmp/wasmtime_main.so
|
||||||
|
[13400280 14179624.00 15124040] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/hex-simd/benchmark.wasm
|
||||||
|
|
||||||
|
Δ = 22611720.00 ± 15198082.61 (confidence = 99%)
|
||||||
|
|
||||||
|
wasmtime/target/release/libwasmtime_bench_api.so is 1.06x to 1.31x faster than tmp/wasmtime_main.so!
|
||||||
|
|
||||||
|
[135396000 143348280.00 154255820] tmp/wasmtime_main.so
|
||||||
|
[112891420 120736560.00 126274080] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-ratelimit/benchmark.wasm
|
||||||
|
|
||||||
|
No difference in performance.
|
||||||
|
|
||||||
|
[49158240 61531312.00 102319960] tmp/wasmtime_main.so
|
||||||
|
[28723540 33731256.00 36821820] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-memmove/benchmark.wasm
|
||||||
|
|
||||||
|
No difference in performance.
|
||||||
|
|
||||||
|
[16707500 20553252.00 27217200] tmp/wasmtime_main.so
|
||||||
|
[13315020 16224728.00 21330760] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/intgemm-simd/benchmark.wasm
|
||||||
|
|
||||||
|
No difference in performance.
|
||||||
|
|
||||||
|
[324449640 352576952.00 413652920] tmp/wasmtime_main.so
|
||||||
|
[273646660 281514868.00 285492580] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-minicsv/benchmark.wasm
|
||||||
|
|
||||||
|
No difference in performance.
|
||||||
|
|
||||||
|
[8602740 9606232.00 11417000] tmp/wasmtime_main.so
|
||||||
|
[7234340 8023400.00 8844940] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/shootout-heapsort/benchmark.wasm
|
||||||
|
|
||||||
|
No difference in performance.
|
||||||
|
|
||||||
|
[20328440 21526748.00 22546480] tmp/wasmtime_main.so
|
||||||
|
[15103220 18372012.00 22779260] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
|
|
||||||
|
compilation :: cycles :: benchmarks/blake3-scalar/benchmark.wasm
|
||||||
|
|
||||||
|
No difference in performance.
|
||||||
|
|
||||||
|
[93674620 133889868.00 183640420] tmp/wasmtime_main.so
|
||||||
|
[106974240 122942228.00 152750560] wasmtime/target/release/libwasmtime_bench_api.so
|
||||||
@@ -686,3 +686,34 @@ pub fn u64_key(b: u32, a: u32) -> u64 {
|
|||||||
pub fn u128_key(d: u32, c: u32, b: u32, a: u32) -> u128 {
|
pub fn u128_key(d: u32, c: u32, b: u32, a: u32) -> u128 {
|
||||||
a as u128 | (b as u128) << 32 | (c as u128) << 64 | (d as u128) << 96
|
a as u128 | (b as u128) << 32 | (c as u128) << 64 | (d as u128) << 96
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct Bitmap {
|
||||||
|
storage: SmallVec<[u64; 2]>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Bitmap {
|
||||||
|
pub fn init(entry_count: usize) -> Self {
|
||||||
|
let u64_count = (entry_count + 63) / 64;
|
||||||
|
let mut storage = SmallVec::<[u64; 2]>::with_capacity(u64_count);
|
||||||
|
storage.resize(u64_count, 0);
|
||||||
|
Self { storage }
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set(&mut self, idx: usize) {
|
||||||
|
let storage_idx = idx / 64;
|
||||||
|
let bit = 1u64 << (idx % 64);
|
||||||
|
self.storage[storage_idx] |= bit;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn un_set(&mut self, idx: usize) {
|
||||||
|
let storage_idx = idx / 64;
|
||||||
|
let bit = 1u64 << (idx % 64);
|
||||||
|
self.storage[storage_idx] &= !bit;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn is_set(&mut self, idx: usize) -> bool {
|
||||||
|
let storage_idx = idx / 64;
|
||||||
|
let bit = 1u64 << (idx % 64);
|
||||||
|
(self.storage[storage_idx] & bit) != 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
2232
src/ion/fast_alloc2.rs
Normal file
2232
src/ion/fast_alloc2.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -37,6 +37,7 @@ use process::*;
|
|||||||
use smallvec::smallvec;
|
use smallvec::smallvec;
|
||||||
pub(crate) mod dump;
|
pub(crate) mod dump;
|
||||||
mod fast_alloc;
|
mod fast_alloc;
|
||||||
|
mod fast_alloc2;
|
||||||
pub(crate) mod moves;
|
pub(crate) mod moves;
|
||||||
pub(crate) mod spill;
|
pub(crate) mod spill;
|
||||||
pub(crate) mod stackmap;
|
pub(crate) mod stackmap;
|
||||||
|
|||||||
@@ -1491,7 +1491,13 @@ pub fn run<F: Function>(
|
|||||||
env: &MachineEnv,
|
env: &MachineEnv,
|
||||||
options: &RegallocOptions,
|
options: &RegallocOptions,
|
||||||
) -> Result<Output, RegAllocError> {
|
) -> Result<Output, RegAllocError> {
|
||||||
ion::run(func, env, options.verbose_log, options.validate_ssa, options.fast_alloc)
|
ion::run(
|
||||||
|
func,
|
||||||
|
env,
|
||||||
|
options.verbose_log,
|
||||||
|
options.validate_ssa,
|
||||||
|
options.fast_alloc,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Options for allocation.
|
/// Options for allocation.
|
||||||
|
|||||||
Reference in New Issue
Block a user