Bun 1.3.9: Parallel Script Execution and JavaScriptCore’s SIMD Regex Revolution

3 min read

Bun’s latest release packs serious developer experience improvements alongside deep engine-level optimizations. The headliner is bun run --parallel—finally, a native way to run multiple package.json scripts concurrently without reaching for third-party tools.

The Core Insight

The new --parallel and --sequential flags transform how developers work with monorepos and multi-script workflows:

# Run build and test concurrently
bun run --parallel build test

# Glob-matched script names  
bun run --parallel "build:*"

# All workspace packages in parallel
bun run --parallel --filter '*' build

# Sequential with failure handling
bun run --sequential --no-exit-on-error --workspaces test

Each script gets color-coded, padded output prefixes so you can trace what came from where:

build | compiling...
test  | running suite...
lint  | checking files...

With --filter or --workspaces, package names appear too:

pkg-a:build | compiling...
pkg-b:build | compiling...

The key distinction from --filter: parallel mode doesn’t respect dependency order. If package B depends on package A, --filter waits for A to complete first. --parallel fires everything immediately. This makes it perfect for long-running watch scripts that would otherwise block the dependency chain.

Why This Matters

Beyond the ergonomic improvements, this release includes significant JavaScriptCore upgrades with real-world performance implications:

SIMD-Accelerated Regex: Regular expressions with alternatives like /aaaa|bbbb/ now use SIMD instructions to scan 16 bytes at a time, rejecting non-matching positions before falling back to scalar matching. This is implemented for both ARM64 and x86_64.

JIT-Compiled Fixed-Count Patterns: Non-capturing groups with quantifiers like (?:abc){3} previously fell back to the slower interpreter. Now they’re JIT-compiled, yielding ~3.9x speedups.

Optimized Built-ins:
String.prototype.startsWith: Up to 5.76x faster with constant folding
Set.size / Map.size: 2.24x – 2.74x faster via DFG/FTL intrinsics
String.prototype.trim: 1.1x – 1.42x faster with direct pointer access
String.prototype.replace: Returns rope structures instead of eager copies

Markdown Performance: Bun.Markdown now uses SIMD-accelerated scanning for HTML escaping, plus cached tag strings in the React renderer. Result: 7-28% faster rendering depending on document size.

The HTTP/2 connection upgrade fix enables patterns used by libraries like http2-wrapper and crawlee—forwarding raw TCP connections from a net.Server to an Http2SecureServer now works correctly.

Key Takeaways

  • bun run --parallel: Run multiple scripts concurrently with prefixed output
  • bun run --sequential: Run scripts in order with the same output formatting
  • Workspace integration: Works seamlessly with --filter and --workspaces
  • --no-exit-on-error: Continue running even if one script fails
  • mock() / spyOn() Symbol.dispose: Use using keyword for automatic mock cleanup
  • NO_PROXY now respected: Works even with explicit proxy options
  • --cpu-prof-interval: Configure CPU profiler sampling in microseconds
  • ESM bytecode in --compile: --bytecode now works with --format=esm
  • ARM64 fix: No more SIGILL crashes on ARMv8.0 CPUs (Raspberry Pi 4, AWS a1)

Looking Ahead

The JavaScriptCore upgrades demonstrate Bun’s commitment to engine-level performance. While Node.js inherits V8’s optimizations, Bun is actively contributing upstream improvements to WebKit/JSC. The regex SIMD work in particular shows meaningful investment in making JavaScript faster at the foundation level.

The --parallel flag addresses a gap that has sent many developers to tools like concurrently or npm-run-all. Having it built into the runtime with first-class workspace support makes monorepo development significantly smoother.

For teams evaluating Bun for production workloads, this release adds stability (the HTTP/2 fix, ARM64 crash fix) alongside developer experience improvements. The TypeScript type fixes are also worth noting if you’ve hit confusing errors with Bun.Build.CompileTarget.


Based on analysis of Bun v1.3.9


Share this article

Related Articles