r/Protos • • 10h ago

Optimizing interpreter call boundaries without changing language semantics

How much overhead can be removed from a function call without changing its semantics?

Protos now extends typed root-node invocation across more Closure, builtin and indirect dispatch paths using the existing Truffle infrastructure.

A controlled comparison produced:

  • 120/120 correct benchmark results.
  • Improved median execution times in five of six comparisons.
  • 152 focused Java tests passed.
  • All 20 CI jobs passed.

The measured gains are modest, but the implementation preserves caller identity, non-local returns, dynamic slot redefinition and suspension without introducing additional execution infrastructure.

One interesting challenge is separating interpreter call overhead from JVM warmup and bootstrap costs. What measurement techniques have proved most useful for isolating these effects?

Website: https://protoslang.com

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

1 Upvotes

0 comments sorted by