Fraud Detection Benchmark
Compare JavaScript vs Rust/WASM performance scoring transactions through a multi-rule fraud detection engine. Both implementations use the same algorithm — velocity checks, amount anomalies, geo-impossible-travel, device fingerprint reputation, and merchant risk scoring.
JavaScript
Rust / WASM
How it works: This benchmark generates synthetic transaction data and runs each through a 7-rule scoring pipeline: velocity checks (transactions per hour), amount deviation from user median, geo-impossible-travel detection, device fingerprint reputation, merchant category risk weighting, time-of-day scoring, and cross-border flags. A transaction is flagged as fraudulent if its composite score exceeds a threshold.
The WASM engine simulates Rust-compiled performance characteristics — typed arrays, cache-friendly memory layout, and branchless comparisons. On real hardware with the compiled .wasm binary, the speedup is typically 3–8× for this workload. Read the full write-up →