r/Protos • • 7h ago

Pass-by-value without copying every element: 115× faster isolated array transfers

Does pass-by-value really require physically copying every element?

The latest Protos runtime optimization separates logical isolation from physical storage using protected primitive backing arrays and copy-on-write.

For round trips involving 65,536 integers, the measured improvements are:

  • Actor transfers: 44.22x faster on JVM and 103.75x on Native Image.
  • Isolated parallel execution: 55.94x and 115.29x, respectively.
  • Even when the destination immediately modifies the array, transfers remain up to 23x faster.

Large binary payloads also benefit from eliminating redundant copies, with improvements of up to 2.80x.

No new ownership API. No shared mutable guest state. Existing snapshot semantics remain intact.

These are workload-specific before/after benchmarks, not general runtime speedups.

How much of the cost of isolated concurrency comes from unnecessary physical copying rather than isolation itself?

Website: https://protoslang.com

Source: https://github.com/guillermomolina/protos

1 Upvotes

0 comments sorted by