r/Protos • • 2h ago

Removing unnecessary text conversions cuts processing time by around 25% in Protos

1 Upvotes

Sometimes the performance bottleneck is not the algorithm itself, but the cost of moving data between representations.

Recent changes to Protos eliminate intermediate text conversions, unnecessary allocations and redundant byte copying in Unicode encoding and decoding.

Local Native measurements show approximately 25% lower processing time in both direct and parallel catalog workloads, without changing the JSON parser or relaxing Unicode correctness.

All 1,600 conformance cases pass, and the changes are now integrated into main.

How much of modern runtime performance is lost to conversions between internal representations?

Website: https://protoslang.com

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


r/Protos • • 4h ago

Can CI finish faster without adding runners or reducing test coverage?

1 Upvotes

The same eight CI suite runners, a different static shard allocation, and all 7,589 Core and Standard Library test cases passing.

The first comparison reduced the slowest library job from 14m 27s to 12m 59s.

No dynamic scheduling, historical timing database, or reduced test coverage. Deterministic partitioning and exhaustive pull request validation remain intact.

The interesting trade-off: a shorter critical path, but higher accumulated runner time. Runner variability also remains significant.

How do other projects balance CI latency against total runner consumption?

Website: https://protoslang.com

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


r/Protos • • 5h ago

Optimizing a JSON parser without changing its public API

1 Upvotes

How much unnecessary work happens between reading a JSON document and constructing its final object tree?

The latest Protos JSON parser update targets three areas:

  • Temporary allocations during token scanning.
  • Redundant byte reads and unnecessary decoding.
  • Repeated array copying during tree construction.

Arrays now accumulate elements in fixed-size blocks before linear final materialization.

Exact numeric representation, Unicode handling, dynamic constructor selection and reentrant parsing retain their existing contracts.

The implementation remains entirely in Protos, with no production Java changes. All 20 exhaustive CI jobs passed.

Website: https://protoslang.com

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

Which tends to dominate JSON parsing costs in your workloads: scanning, allocation or tree construction?


r/Protos • • 6h ago

How a single compiler condition eliminates recursive bytecode expansion in Protos

1 Upvotes

Repeated references to the same Closure definition no longer generate redundant bytecode roots.

The compiler now emits each Closure definition once per bytecode group parse, preserving independent captures, non-local returns, suspension and specialized execution paths.

The Standard Library Scanner produces 67 roots for 66 unique Closure definitions, with no roots outside the observed reachable graph. Serializer traversal also passes.

782 focused tests reported no failures, with one skip. All 20 exhaustive CI jobs passed.

An interesting example of how a small compiler change can address a much larger structural problem.

Website: https://protoslang.com

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


r/Protos • • 7h ago

Removing repeated Unicode prefix scans with TruffleString and specialized bytecode

1 Upvotes

Unicode scalar indexing should not require scanning a string from the beginning on every access.

Core String now uses immutable TruffleString storage with canonical UTF-32 logical encoding, allowing compact physical representations where appropriate.

The existing Bytecode DSL specializes indexing, length, concatenation, equality, hashing and iteration while preserving dynamic message semantics and overridden operations.

The change passed all 20 jobs of exhaustive pull-request validation, including Native Image.

An interesting runtime design question: how much string-specific optimization can remain inside the execution engine without compromising dynamic language semantics?

Website: https://protoslang.com

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

Implementation: https://github.com/guillermomolina/protos/pull/1297


r/Protos • • 7h ago

Fixing a lost-wakeup race in actor group routing without introducing new threads or polling

1 Upvotes

An actor group can have available workers and still leave a request waiting indefinitely if a routing wakeup is lost during queue draining.

The latest runtime fix addresses this concurrency issue while preserving bounded retries, delivery ownership and cancellation semantics.

No additional threads, executors, polling or timeout workarounds were introduced.

Deterministic concurrency regressions now cover concurrent submissions, actor readiness notifications and persistent remote delivery failures. All 20 mandatory PR CI jobs passed.

An interesting concurrency design question: how should a runtime distinguish genuine new work from synchronous retries without losing progress or introducing infinite retry loops?

Technical details: https://github.com/guillermomolina/protos/issues/1296

Website: https://protoslang.com

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


r/Protos • • 7h ago

20 CI jobs, one mandatory integration gate: protecting main without complicating development

1 Upvotes

Every change to main now requires exhaustive pre-merge validation, including the complete Standard Library, concurrency tests, compilerability and Native Image.

The first protected PR passed all 20 CI jobs and merged automatically six seconds after the final check.

Development versions now remain stable throughout a release cycle, with independent changelog fragments reducing conflicts between concurrent contributions.

The same integration fixes an ActorGroup lost-wakeup defect while preserving bounded routing retries.

The interesting challenge is reducing duplicated post-merge CI without compromising exact-revision validation evidence. How do other projects handle this trade-off?

https://protoslang.com/

https://github.com/guillermomolina/protos


r/Protos • • 18h ago

Announcement Adding a bytecode instruction that disappears during partial evaluation

1 Upvotes

Can adding a bytecode instruction actually simplify a runtime without adding residual work to compiled execution?

Protos now uses generated Truffle lexical ranges instead of manually constructed accessors, preserving live execution contexts, mutable captures and debugger visibility.

The interesting part is what happens during Graal partial evaluation: both Tier 1 and Tier 2 compilation graphs show that the publication operation disappears entirely in the tested method.

This also removes an identified obstacle to bytecode serialization.

How should reflective execution contexts coexist with highly optimized local variable access?

Website: https://protoslang.com

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


r/Protos • • 19h ago

From 916 MiB to 25 MiB: keeping compiler performance metrics without storing entire graphs

1 Upvotes

How much compiler diagnostic data actually needs to be stored permanently?

The Protos benchmark repository now retains detailed performance summaries instead of complete compiler graphs.

The results:

  • 97.23% smaller packed Git history.
  • 936 graph pairs compacted.
  • 338 historical graphs recovered as summaries.
  • Execution times, Bytecode DSL operation counts, bytecode sizes and Tier 1/Tier 2 node histograms preserved.
  • All 329 harness tests passing.

Graphs can still be generated on demand for deeper compiler investigations.

What compiler metrics are most valuable for tracking performance regressions over time?

Website: https://protoslang.com

GitHub: https://github.com/guillermomolina/protos-benchmarks