Skip to content

Add shared Process API for desktop and backend - #6010

Open
shai-almog wants to merge 7 commits into
masterfrom
process-api-desktop
Open

shai-almog wants to merge 7 commits into
masterfrom
process-api-desktop

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Adds com.codename1.io.ProcessBuilder and Process for Windows, macOS, and Linux desktop applications and backend applications. The JavaSE-style API works without initializing Display or a server, with host-JDK and shared ParparVM adapters. Mobile/browser ports report unsupported and fail explicitly.

The API supports literal argument lists, working directories, environment changes, separate or merged stdout/stderr, binary stdin, exit status, interruptible timed waits, termination, and explicit cleanup. Native pipes use nonblocking/overlapped I/O, children are independently reaped, and backend virtual threads park between polls. The one-host regression exposed a scheduler bug: capture the nap-table entry's key before removing it, because the native map clears removed entries.

Documents platform behavior, resource ownership, and intentional JavaSE differences: native OS path strings, lazy environment snapshots, AutoCloseable cleanup, and no file redirection, inheritIO, pipelines, or ProcessHandle in this subset.

Fixes #5992.

Validation

  • Java 8 core reactor verify with ProcessBuilderTest,ButtonGroupTest: 11 tests passed, SpotBugs passed, zero Checkstyle findings.
  • JavaSE, macOS, Windows, Linux, and backend Maven artifacts packaged successfully. Verified native source packaging excludes the host-JDK adapter.
  • Real-child Java conformance passed on the JVM, the packaged JVM backend artifact, and translated macOS/Linux runtimes: arguments, Unicode, environment, cwd, binary duplex I/O, merged stderr, errors, timed waits, interrupts, termination, and repeated launches.
  • Optimized macOS/Linux one-host virtual-thread regression passed for both pending pipe reads and process waits, including cleanup.
  • OS-layer conformance passed on macOS/Linux and Windows under local Wine, including Unicode/space-containing executable paths, descriptor/handle counts, child reaping, and closed-stdin behavior. Windows code and translated bindings also compiled with MinGW; Windows execution coverage uses Wine.
  • Native signature verification passed for iOS, macOS, Windows, Linux, and backend. iOS simulator bindings compiled with no fork/exec/spawn imports.

All native execution was local. No native CI jobs, labels, or workflow changes were added.

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T18:35:29.883102Z 2fac0a4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d396e5faba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/io/Process.java
@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 44ms / native 3ms = 14.6x speedup
SIMD float-mul (64K x300) java 44ms / native 2ms = 22.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 61.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 105.000 ms
Base64 encode ratio (SIMD/CN1) 1.721x (72.1% slower)
Base64 SIMD decode 77.000 ms
Base64 decode ratio (SIMD/CN1) 0.865x (13.5% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 5.000 ms
Image createMask ratio (SIMD on/off) 0.556x (44.4% faster)
Image applyMask (SIMD off) 20.000 ms
Image applyMask (SIMD on) 26.000 ms
Image applyMask ratio (SIMD on/off) 1.300x (30.0% slower)
Image modifyAlpha (SIMD off) 28.000 ms
Image modifyAlpha (SIMD on) 12.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.429x (57.1% faster)
Image modifyAlpha removeColor (SIMD off) 29.000 ms
Image modifyAlpha removeColor (SIMD on) 19.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.655x (34.5% faster)

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 50ms / native 4ms = 12.5x speedup
SIMD float-mul (64K x300) java 51ms / native 4ms = 12.7x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 65.000 ms
Base64 CN1 decode 80.000 ms
Base64 SIMD encode 90.000 ms
Base64 encode ratio (SIMD/CN1) 1.385x (38.5% slower)
Base64 SIMD decode 90.000 ms
Base64 decode ratio (SIMD/CN1) 1.125x (12.5% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 5.000 ms
Image createMask ratio (SIMD on/off) 0.714x (28.6% faster)
Image applyMask (SIMD off) 23.000 ms
Image applyMask (SIMD on) 25.000 ms
Image applyMask ratio (SIMD on/off) 1.087x (8.7% slower)
Image modifyAlpha (SIMD off) 35.000 ms
Image modifyAlpha (SIMD on) 25.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.714x (28.6% faster)
Image modifyAlpha removeColor (SIMD off) 37.000 ms
Image modifyAlpha removeColor (SIMD on) 49.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.324x (32.4% slower)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: Intel64 Family 6 Model 207 Stepping 2, GenuineIntel (baseline windows-x64@intel64-family-6-model-207-genuineintel)

1 improvement past the baseline, which fails until rebaselined:

  • recursion on all 4 CPUs: time 0.94x against a 1.21x baseline (-22.1%, tolerance 20%)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.25x (base 1.07x, +16.9%) 0.92x (base 0.82x, +11.7%) ok
translator (self) 4 0.60x (base 0.60x, -0.9%) 0.56x (base 0.53x, +6.6%) ok
intArithmetic 4 1.04x (base 1.02x, +1.2%) 0.06x (base 0.06x, -0.6%) ok
longArithmetic 4 0.97x (base 0.97x, -0.4%) 0.05x (base 0.05x, +1.1%) ok
mathTranscendental 4 0.88x (base 0.89x, -0.2%) 0.06x (base 0.06x, +0.9%) ok
arraySequential 4 1.52x (base 1.98x, -23.4%) 0.38x (base 0.38x, +0.2%) ok
arrayRandom 4 1.00x (base 1.01x, -0.7%) 0.23x (base 0.23x, +0.2%) ok
objectAllocation 4 1.24x (base 1.22x, +1.5%) 0.33x (base 0.37x, -10.9%) ok
valueEscape 4 0.13x (base 0.13x, +1.7%) 0.05x (base 0.04x, +0.5%) ok
hashMapChurn 4 1.05x (base 1.14x, -8.1%) 0.10x (base 0.10x, +0.4%) ok
stringBuilding 4 1.49x (base 1.42x, +5.6%) 0.26x (base 0.22x, +17.3%) ok
recursion 4 0.94x (base 1.21x, -22.1%) 0.06x (base 0.06x, +0.7%) IMPROVED: rebaseline (time -22.1%)
quicksort 4 1.08x (base 1.07x, +1.0%) 0.12x (base 0.12x, +0.4%) ok

A change that moves performance ON PURPOSE records the new baseline in vm/selfhost/perf-baseline/pr/6010.json, with the reason, from this job's perf-results.json. The rebaseline is then part of this pull request's diff:

python3 vm/selfhost/calibrate-perf-baseline.py --pr 6010 --reason "<why these benchmarks moved>" perf-results.json

Result: improved past the baseline: rebaseline required

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ✅ ByteCodeTranslator: 0 findings (no issues)
    • ✅ android: 0 findings (no issues)
    • ✅ android-compat: 0 findings (no issues)
    • ✅ android-res-compiler: 0 findings (no issues)
    • ✅ backend: 0 findings (no issues)
    • ✅ backend-test: 0 findings (no issues)
    • ✅ build-engine: 0 findings (no issues)
    • ✅ build-hint-catalog: 0 findings (no issues)
    • ✅ build-hint-tools: 0 findings (no issues)
    • ✅ codenameone-gradle-plugin: 0 findings (no issues)
    • ✅ codenameone-maven-plugin: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ project-model: 0 findings (no issues)
  • ✅ PMD: 0 findings (no issues) [Report archive]
  • ✅ Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f3785fbf7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vm/ByteCodeTranslator/src/cn1_process_vm.h Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 170 screenshots: 170 matched.

Native Android coverage

  • 📊 Line coverage: 16.01% (26002/162390 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 14.37% (122147/850229), branch 9.91% (8466/85441), complexity 7.81% (6525/83503), method 11.59% (4648/40094), class 19.78% (960/4853)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 16.01% (26002/162390 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 14.37% (122147/850229), branch 9.91% (8466/85441), complexity 7.81% (6525/83503), method 11.59% (4648/40094), class 19.78% (960/4853)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 132ms / native 28ms = 4.7x speedup
SIMD float-mul (64K x300) java 56ms / native 38ms = 1.4x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 40.000 ms
Base64 CN1 decode 47.000 ms
Base64 native encode 343.000 ms
Base64 encode ratio (CN1/native) 0.117x (88.3% faster)
Base64 native decode 184.000 ms
Base64 decode ratio (CN1/native) 0.255x (74.5% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 206 screenshots: 206 matched.
✅ JavaScript-port screenshot tests passed.

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Linux port (x64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub x64 runner. Baseline: scripts/linux/screenshots.

ParparVM vs HotSpot (JDK 25): Linux x64

Runner CPU: AMD EPYC 9V45 96-Core Processor (baseline linux-x64@amd-epyc-9v45-96-core-processor)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 1.03x (base 0.95x, +8.3%) 0.84x (base 0.86x, -2.3%) ok
translator (self) 4 0.63x (base 0.64x, -2.3%) 0.46x (base 0.45x, +2.0%) ok
intArithmetic 4 1.00x (base 1.00x, +0.3%) 0.07x (base 0.07x, +0.5%) ok
longArithmetic 4 0.99x (base 0.99x, -0.1%) 0.05x (base 0.07x, -25.8%) ok
mathTranscendental 4 1.19x (base 1.19x, -0.0%) 0.06x (base 0.08x, -24.0%) ok
arraySequential 4 3.31x (base 3.38x, -2.0%) 0.38x (base 0.36x, +5.8%) ok
arrayRandom 4 1.05x (base 1.02x, +2.4%) 0.21x (base 0.21x, -0.3%) ok
objectAllocation 4 1.60x (base 1.61x, -0.6%) 0.27x (base 0.24x, +12.1%) ok
valueEscape 4 0.10x (base 0.10x, +0.7%) 0.04x (base 0.04x, +0.7%) ok
hashMapChurn 4 1.21x (base 1.21x, +0.3%) 0.09x (base 0.09x, -4.5%) ok
stringBuilding 4 1.57x (base 1.56x, +0.7%) 0.26x (base 0.26x, +0.2%) ok
recursion 4 1.30x (base 1.35x, -3.6%) 0.06x (base 0.07x, -23.8%) ok
quicksort 4 1.06x (base 1.06x, +0.5%) 0.13x (base 0.11x, +16.8%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Linux port (arm64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub arm64 runner. Baseline: scripts/linux/screenshots-arm.

ParparVM vs HotSpot (JDK 25): Linux arm64

Runner CPU: Neoverse-N2 (baseline linux-arm64@neoverse-n2)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 1.03x (base 0.93x, +10.4%) 0.95x (base 0.87x, +9.9%) ok
translator (self) 4 0.73x (base 0.70x, +4.8%) 0.48x (base 0.45x, +8.0%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.03x (base 0.03x, -0.5%) ok
longArithmetic 4 0.79x (base 0.79x, -0.0%) 0.03x (base 0.03x, -0.4%) ok
mathTranscendental 4 1.10x (base 1.10x, -0.0%) 0.03x (base 0.03x, +1.0%) ok
arraySequential 4 0.42x (base 0.36x, +14.9%) 0.37x (base 0.37x, +0.2%) ok
arrayRandom 4 0.94x (base 0.94x, +0.2%) 0.20x (base 0.20x, -0.5%) ok
objectAllocation 4 1.92x (base 1.77x, +8.3%) 0.37x (base 0.38x, -2.6%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, -1.7%) ok
hashMapChurn 4 0.83x (base 0.84x, -1.9%) 0.12x (base 0.12x, -1.4%) ok
stringBuilding 4 1.44x (base 1.36x, +6.2%) 0.26x (base 0.26x, +0.4%) ok
recursion 4 1.55x (base 1.43x, +8.4%) 0.03x (base 0.04x, -3.0%) ok
quicksort 4 1.00x (base 0.99x, +0.6%) 0.09x (base 0.09x, +0.2%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 53ms / native 3ms = 17.6x speedup
SIMD float-mul (64K x300) java 53ms / native 2ms = 26.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 61.000 ms
Base64 CN1 decode 73.000 ms
Base64 SIMD encode 74.000 ms
Base64 encode ratio (SIMD/CN1) 1.213x (21.3% slower)
Base64 SIMD decode 72.000 ms
Base64 decode ratio (SIMD/CN1) 0.986x (1.4% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 19.000 ms
Image applyMask (SIMD on) 20.000 ms
Image applyMask ratio (SIMD on/off) 1.053x (5.3% slower)
Image modifyAlpha (SIMD off) 18.000 ms
Image modifyAlpha (SIMD on) 13.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.722x (27.8% faster)
Image modifyAlpha removeColor (SIMD off) 22.000 ms
Image modifyAlpha removeColor (SIMD on) 16.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.727x (27.3% faster)

ParparVM vs HotSpot (JDK 25): Windows arm64

Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline windows-arm64@armv8-64-bit-family-8-model-d49-microsoft-corporation)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.09x (base 1.11x, -1.4%) 1.22x (base 0.97x, +25.6%) ok
translator (self) 4 0.86x (base 0.84x, +2.9%) 0.49x (base 0.45x, +7.6%) ok
intArithmetic 4 1.04x (base 1.04x, -0.1%) 0.06x (base 0.06x, +1.6%) ok
longArithmetic 4 0.79x (base 0.80x, -0.3%) 0.06x (base 0.06x, +1.9%) ok
mathTranscendental 4 0.74x (base 0.72x, +3.0%) 0.06x (base 0.06x, +0.2%) ok
arraySequential 4 0.42x (base 0.46x, -7.3%) 0.39x (base 0.39x, -0.1%) ok
arrayRandom 4 0.94x (base 0.94x, +0.3%) 0.23x (base 0.23x, +0.1%) ok
objectAllocation 4 1.80x (base 2.81x, -36.0%) 0.33x (base 0.43x, -23.8%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +2.3%) ok
hashMapChurn 4 0.99x (base 0.98x, +0.8%) 0.12x (base 0.12x, +5.0%) ok
stringBuilding 4 1.51x (base 1.43x, +5.8%) 0.27x (base 0.27x, -0.2%) ok
recursion 4 1.46x (base 1.46x, +0.0%) 0.06x (base 0.07x, -0.2%) ok
quicksort 4 1.01x (base 1.00x, +1.1%) 0.12x (base 0.12x, -0.1%) ok

Result: no regression

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 826 total, 0 failed, 57 skipped

Benchmark Results

  • Execution Time: 4459 ms

  • Hotspots (Top 20 sampled methods):

    • 9.43% com.codename1.tools.translator.BytecodeMethod.equals (64 samples)
    • 7.81% java.lang.System.identityHashCode (53 samples)
    • 6.63% java.lang.Object.hashCode (45 samples)
    • 5.74% com.codename1.tools.translator.IteratorEscape.mangle (39 samples)
    • 2.65% java.util.ArrayList.indexOf (18 samples)
    • 2.36% java.lang.StringBuilder.append (16 samples)
    • 2.06% com.codename1.tools.translator.Parser.cullMethods (14 samples)
    • 1.91% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (13 samples)
    • 1.77% com.codename1.tools.translator.DeadFieldElimination.run (12 samples)
    • 1.77% java.lang.String.equals (12 samples)
    • 1.77% java.util.AbstractCollection.containsAll (12 samples)
    • 1.62% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (11 samples)
    • 1.62% java.io.FileOutputStream.writeBytes (11 samples)
    • 1.62% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (11 samples)
    • 1.47% com.codename1.tools.translator.Parser.writeOutput (10 samples)
    • 1.47% java.util.HashMap.putVal (10 samples)
    • 1.18% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (8 samples)
    • 1.18% com.codename1.tools.translator.Parser.collectTypeTests (8 samples)
    • 1.03% com.codename1.tools.translator.BytecodeMethod.isFramelessEligibleImpl (7 samples)
    • 1.03% com.codename1.tools.translator.NativeSymbolIndex.<init> (7 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 12 screenshots: 12 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 26bd8cc408

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/io/ProcessBuilder.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d53d55000e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vm/ByteCodeTranslator/src/cn1_process_vm.h
Comment thread vm/ByteCodeTranslator/src/cn1_process_vm.h
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 2fac0a411f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 168 screenshots: 168 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 1775 seconds

Build and Run Timing

Metric Duration
Simulator Boot 1000 ms
Simulator Boot (Run) 1000 ms
App Install 17000 ms
App Launch 10000 ms
Test Execution 410000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 56ms / native 4ms = 14.0x speedup
SIMD float-mul (64K x300) java 61ms / native 2ms = 30.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 59.000 ms
Base64 CN1 decode 67.000 ms
Base64 native encode 1104.000 ms
Base64 encode ratio (CN1/native) 0.053x (94.7% faster)
Base64 native decode 564.000 ms
Base64 decode ratio (CN1/native) 0.119x (88.1% faster)
Base64 SIMD encode 56.000 ms
Base64 encode ratio (SIMD/CN1) 0.949x (5.1% faster)
Base64 SIMD decode 51.000 ms
Base64 decode ratio (SIMD/CN1) 0.761x (23.9% faster)
Base64 encode ratio (SIMD/native) 0.051x (94.9% faster)
Base64 decode ratio (SIMD/native) 0.090x (91.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.286x (71.4% faster)
Image applyMask (SIMD off) 50.000 ms
Image applyMask (SIMD on) 34.000 ms
Image applyMask ratio (SIMD on/off) 0.680x (32.0% faster)
Image modifyAlpha (SIMD off) 36.000 ms
Image modifyAlpha (SIMD on) 59.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.639x (63.9% slower)
Image modifyAlpha removeColor (SIMD off) 35.000 ms
Image modifyAlpha removeColor (SIMD on) 28.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.800x (20.0% faster)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFE: JavaSE-style Process API for all desktop platforms and backend

1 participant