Skip to content

iOS: publish the view size after a modal hides a rotation (#6080) - #6085

Merged
shai-almog merged 2 commits into
masterfrom
ios-rotate-under-native-modal-6080
Oct 24, 2026
Merged

shai-almog merged 2 commits into
masterfrom
ios-rotate-under-native-modal-6080

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Fixes #6080.

On an iPhone, rotating the device while a full-screen modal that only supports portrait covers the Codename One view (the UIImagePickerController camera, for Capture.capturePhoto/captureVideo) delivers no viewWillTransitionToSize: when the modal is dismissed. The view comes back laid out landscape while the framework keeps the portrait size, so every form draws stretched until the device is rotated again.

Fix

CodenameOne_GLViewController gets an iOS viewDidLayoutSubviews that publishes any view size the transition callbacks did not: framebuffer resize, screenSizeChanged, repaint. That is the same sequence viewWillTransitionToSize: runs. It returns at the size comparison in the usual case, where the transition already published the size. It skips the background-snapshot layout (isAppSuspended) for the same reason the transition handler does. Catalyst and tvOS keep their existing debounced version.

Test

NativeModalRotationTest (hellocodenameone, iOS only, no screenshot) presents a native portrait-only full-screen modal, locks landscape under it, dismisses it and asserts that the display size equals the view's pixel size. Other platforms get stub native implementations and finish immediately. It runs right after OrientationLockScreenshotTest and restores portrait itself.

Verified locally on the iPhone 16e simulator (iOS 26.3):

  • without the fix: view is 2532x1170 pixels but the display is 1170x2532 (issue #6080)
  • with the fix: passes

🤖 Generated with Claude Code

Rotating an iPhone while a full-screen modal that supports only portrait
covers the Codename One view (the UIImagePickerController camera) delivers
no viewWillTransitionToSize: when the modal is dismissed. The view comes back
laid out landscape while the framework keeps the portrait size, so every
form draws stretched until the next rotation.

viewDidLayoutSubviews now publishes any size the transition callbacks did
not, as the Catalyst/tvOS path already does.

NativeModalRotationTest reproduces it on the simulator: it presents a
portrait-only modal, locks landscape under it, dismisses it and compares the
display size with the view's pixel size. Without the fix it fails with
"view is 2532x1170 pixels but the display is 1170x2532".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 23, 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.

…ed to iOS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 178 screenshots: 178 matched.

Native Android coverage

  • 📊 Line coverage: 17.40% (30694/176425 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 15.70% (144983/923606), branch 10.66% (10015/93920), complexity 8.22% (7452/90646), method 12.01% (5160/42960), class 20.72% (1060/5117)
    • 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: 17.40% (30694/176425 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 15.70% (144983/923606), branch 10.66% (10015/93920), complexity 8.22% (7452/90646), method 12.01% (5160/42960), class 20.72% (1060/5117)
    • 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 107ms / native 57ms = 1.8x speedup
SIMD float-mul (64K x300) java 43ms / native 64ms = 0.6x 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 47.000 ms
Base64 CN1 decode 47.000 ms
Base64 native encode 291.000 ms
Base64 encode ratio (CN1/native) 0.162x (83.8% faster)
Base64 native decode 145.000 ms
Base64 decode ratio (CN1/native) 0.324x (67.6% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 56ms / native 5ms = 11.2x speedup
SIMD float-mul (64K x300) java 57ms / native 5ms = 11.4x 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 73.000 ms
Base64 CN1 decode 91.000 ms
Base64 SIMD encode 113.000 ms
Base64 encode ratio (SIMD/CN1) 1.548x (54.8% slower)
Base64 SIMD decode 106.000 ms
Base64 decode ratio (SIMD/CN1) 1.165x (16.5% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 10.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.400x (60.0% faster)
Image applyMask (SIMD off) 27.000 ms
Image applyMask (SIMD on) 30.000 ms
Image applyMask ratio (SIMD on/off) 1.111x (11.1% slower)
Image modifyAlpha (SIMD off) 31.000 ms
Image modifyAlpha (SIMD on) 19.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.613x (38.7% faster)
Image modifyAlpha removeColor (SIMD off) 31.000 ms
Image modifyAlpha removeColor (SIMD on) 42.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.355x (35.5% slower)

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 44ms / native 3ms = 14.6x speedup
SIMD float-mul (64K x300) java 45ms / native 4ms = 11.2x 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 60.000 ms
Base64 CN1 decode 72.000 ms
Base64 SIMD encode 83.000 ms
Base64 encode ratio (SIMD/CN1) 1.383x (38.3% slower)
Base64 SIMD decode 92.000 ms
Base64 decode ratio (SIMD/CN1) 1.278x (27.8% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 11.000 ms
Image createMask (SIMD on) 7.000 ms
Image createMask ratio (SIMD on/off) 0.636x (36.4% faster)
Image applyMask (SIMD off) 35.000 ms
Image applyMask (SIMD on) 37.000 ms
Image applyMask ratio (SIMD on/off) 1.057x (5.7% slower)
Image modifyAlpha (SIMD off) 42.000 ms
Image modifyAlpha (SIMD on) 90.000 ms
Image modifyAlpha ratio (SIMD on/off) 2.143x (114.3% slower)
Image modifyAlpha removeColor (SIMD off) 23.000 ms
Image modifyAlpha removeColor (SIMD on) 11.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.478x (52.2% faster)

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 (not a failure; rebaseline to lock it in):

  • recursion on all 4 CPUs: time 0.94x against a 1.20x baseline (-21.4%, 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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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.28x (base 1.07x, +20.1%) 0.70x (base 0.86x, -18.5%) ok
translator (self) 4 0.81x (base 0.79x, +2.7%) 0.50x (base 0.53x, -4.3%) ok
intArithmetic 4 1.02x (base 1.02x, -0.0%) 0.06x (base 0.06x, -2.6%) ok
longArithmetic 4 0.97x (base 0.97x, -0.3%) 0.06x (base 0.05x, +3.5%) ok
mathTranscendental 4 0.89x (base 0.89x, +0.3%) 0.06x (base 0.06x, +2.6%) ok
arraySequential 4 1.51x (base 1.98x, -23.6%) 0.38x (base 0.38x, +0.4%) ok
arrayRandom 4 1.01x (base 1.01x, -0.0%) 0.23x (base 0.23x, +0.8%) ok
objectAllocation 4 0.95x (base 1.22x, -21.9%) 0.38x (base 0.37x, +2.1%) ok
valueEscape 4 0.13x (base 0.13x, +2.3%) 0.05x (base 0.04x, +5.0%) ok
hashMapChurn 4 1.09x (base 1.14x, -4.9%) 0.10x (base 0.10x, +4.4%) ok
stringBuilding 4 1.43x (base 1.42x, +1.3%) 0.27x (base 0.22x, +20.7%) ok
recursion 4 0.94x (base 1.20x, -21.4%) 0.06x (base 0.06x, +3.3%) improved: rebaseline to lock in (time -21.4%)
quicksort 4 1.03x (base 1.07x, -3.2%) 0.12x (base 0.12x, +1.7%) ok

A change that moves performance ON PURPOSE records the new baseline in vm/selfhost/perf-baseline/pr/6085.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 6085 --reason "<why these benchmarks moved>" perf-results.json

Result: no regression (improved past the baseline: consider rebaselining)

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 7763 64-Core Processor (baseline linux-x64@amd-epyc-7763-64-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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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 0.83x (base 0.85x, -2.1%) 0.87x (base 0.83x, +4.4%) ok
translator (self) 4 0.54x (base 0.64x, -15.8%) 0.50x (base 0.52x, -4.1%) ok
intArithmetic 4 1.14x (base 1.12x, +1.9%) 0.06x (base 0.06x, +2.5%) ok
longArithmetic 4 1.08x (base 1.08x, +0.0%) 0.06x (base 0.05x, +4.5%) ok
mathTranscendental 4 1.09x (base 1.08x, +0.5%) 0.06x (base 0.07x, -21.5%) ok
arraySequential 4 1.92x (base 2.00x, -4.2%) 0.36x (base 0.36x, -0.2%) ok
arrayRandom 4 0.93x (base 0.91x, +1.9%) 0.23x (base 0.21x, +9.6%) ok
objectAllocation 4 1.49x (base 1.65x, -9.9%) 0.34x (base 0.35x, -3.0%) ok
valueEscape 4 0.10x (base 0.10x, -0.4%) 0.04x (base 0.04x, +2.0%) ok
hashMapChurn 4 1.47x (base 1.48x, -0.6%) 0.09x (base 0.09x, -1.5%) ok
stringBuilding 4 1.42x (base 1.39x, +2.4%) 0.27x (base 0.31x, -14.9%) ok
recursion 4 1.26x (base 1.25x, +0.0%) 0.06x (base 0.08x, -23.6%) ok
quicksort 4 1.08x (base 1.07x, +0.3%) 0.11x (base 0.11x, +0.0%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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 0.93x (base 1.02x, -9.0%) 0.78x (base 0.93x, -15.9%) ok
translator (self) 4 0.75x (base 0.70x, +7.4%) 0.43x (base 0.43x, -0.6%) ok
intArithmetic 4 1.04x (base 1.04x, -0.1%) 0.04x (base 0.03x, +7.2%) ok
longArithmetic 4 0.79x (base 0.79x, -0.1%) 0.03x (base 0.03x, +5.1%) ok
mathTranscendental 4 1.11x (base 1.10x, +0.7%) 0.04x (base 0.03x, +9.8%) ok
arraySequential 4 0.36x (base 0.36x, -1.2%) 0.37x (base 0.37x, +0.4%) ok
arrayRandom 4 0.94x (base 0.94x, -0.1%) 0.20x (base 0.20x, +0.9%) ok
objectAllocation 4 1.89x (base 1.77x, +6.9%) 0.37x (base 0.37x, +0.3%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, +5.6%) ok
hashMapChurn 4 0.84x (base 0.84x, +0.2%) 0.12x (base 0.12x, -0.1%) ok
stringBuilding 4 1.39x (base 1.57x, -11.0%) 0.32x (base 0.26x, +20.7%) ok
recursion 4 1.56x (base 1.43x, +8.5%) 0.04x (base 0.04x, +2.9%) ok
quicksort 4 1.00x (base 0.99x, +0.9%) 0.09x (base 0.09x, +1.6%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 50ms / native 3ms = 16.6x speedup
SIMD float-mul (64K x300) java 49ms / native 3ms = 16.3x 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 60.000 ms
Base64 CN1 decode 70.000 ms
Base64 SIMD encode 78.000 ms
Base64 encode ratio (SIMD/CN1) 1.300x (30.0% slower)
Base64 SIMD decode 73.000 ms
Base64 decode ratio (SIMD/CN1) 1.043x (4.3% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.200x (80.0% faster)
Image applyMask (SIMD off) 18.000 ms
Image applyMask (SIMD on) 18.000 ms
Image applyMask ratio (SIMD on/off) 1.000x (0.0% slower)
Image modifyAlpha (SIMD off) 17.000 ms
Image modifyAlpha (SIMD on) 11.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.647x (35.3% faster)
Image modifyAlpha removeColor (SIMD off) 20.000 ms
Image modifyAlpha removeColor (SIMD on) 11.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.550x (45.0% 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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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.01x (base 1.11x, -8.9%) 0.54x (base 0.75x, -28.1%) ok
translator (self) 4 0.87x (base 0.84x, +3.9%) 0.51x (base 0.51x, +1.1%) ok
intArithmetic 4 1.04x (base 1.04x, +0.0%) 0.06x (base 0.06x, +3.7%) ok
longArithmetic 4 0.79x (base 0.80x, -0.0%) 0.06x (base 0.06x, +3.9%) ok
mathTranscendental 4 0.72x (base 0.72x, -0.3%) 0.07x (base 0.06x, +2.2%) ok
arraySequential 4 0.40x (base 0.46x, -11.1%) 0.39x (base 0.39x, +0.1%) ok
arrayRandom 4 0.94x (base 0.94x, +0.1%) 0.23x (base 0.23x, +0.4%) ok
objectAllocation 4 1.82x (base 1.82x, +0.0%) 0.41x (base 0.43x, -4.3%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +2.6%) ok
hashMapChurn 4 0.99x (base 0.98x, +1.0%) 0.11x (base 0.12x, -7.4%) ok
stringBuilding 4 1.60x (base 1.43x, +12.3%) 0.27x (base 0.27x, -0.1%) ok
recursion 4 1.55x (base 1.46x, +5.8%) 0.07x (base 0.07x, +1.6%) ok
quicksort 4 1.00x (base 1.00x, +0.3%) 0.12x (base 0.12x, +0.9%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 175 screenshots: 175 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 62ms / native 3ms = 20.6x speedup
SIMD float-mul (64K x300) java 62ms / native 3ms = 20.6x 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 70.000 ms
Base64 CN1 decode 72.000 ms
Base64 native encode 943.000 ms
Base64 encode ratio (CN1/native) 0.074x (92.6% faster)
Base64 native decode 393.000 ms
Base64 decode ratio (CN1/native) 0.183x (81.7% faster)
Base64 SIMD encode 69.000 ms
Base64 encode ratio (SIMD/CN1) 0.986x (1.4% faster)
Base64 SIMD decode 53.000 ms
Base64 decode ratio (SIMD/CN1) 0.736x (26.4% faster)
Base64 encode ratio (SIMD/native) 0.073x (92.7% faster)
Base64 decode ratio (SIMD/native) 0.135x (86.5% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 13.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.231x (76.9% faster)
Image applyMask (SIMD off) 78.000 ms
Image applyMask (SIMD on) 57.000 ms
Image applyMask ratio (SIMD on/off) 0.731x (26.9% faster)
Image modifyAlpha (SIMD off) 51.000 ms
Image modifyAlpha (SIMD on) 46.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.902x (9.8% faster)
Image modifyAlpha removeColor (SIMD off) 82.000 ms
Image modifyAlpha removeColor (SIMD on) 74.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.902x (9.8% faster)

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 179 screenshots: 179 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 54ms / native 3ms = 18.0x speedup
SIMD float-mul (64K x300) java 55ms / native 3ms = 18.3x 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 active (NEON-accelerated)
Base64 CN1 encode 46.000 ms
Base64 CN1 decode 56.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 9.000 ms
Image createMask ratio (SIMD on/off) 1.286x (28.6% slower)
Image applyMask (SIMD off) 51.000 ms
Image applyMask (SIMD on) 44.000 ms
Image applyMask ratio (SIMD on/off) 0.863x (13.7% faster)
Image modifyAlpha (SIMD off) 46.000 ms
Image modifyAlpha (SIMD on) 36.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.783x (21.7% faster)
Image modifyAlpha removeColor (SIMD off) 56.000 ms
Image modifyAlpha removeColor (SIMD on) 41.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.732x (26.8% faster)

ParparVM vs HotSpot (JDK 25): macOS arm64

Runner CPU: Apple M1 (Virtual) (baseline macos-arm64)

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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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 (HelloCodenameOne) 3 0.72x (base 0.96x, -25.1%) 0.93x (base 0.93x, +0.7%) ok
translator (self) 3 0.65x (base 0.62x, +3.6%) 0.55x (base 0.58x, -4.7%) ok
intArithmetic 3 1.00x (base 1.03x, -3.1%) 0.12x (base 0.12x, +1.9%) ok
longArithmetic 3 1.02x (base 1.03x, -0.6%) 0.12x (base 0.07x, +68.3%) ok
mathTranscendental 3 0.98x (base 1.01x, -2.7%) 0.12x (base 0.12x, +1.4%) ok
arraySequential 3 0.48x (base 0.42x, +13.9%) 0.53x (base 0.53x, +0.2%) ok
arrayRandom 3 0.98x (base 0.99x, -0.6%) 0.33x (base 0.32x, +0.3%) ok
objectAllocation 3 1.11x (base 1.11x, -0.1%) 0.87x (base 0.72x, +20.5%) ok
valueEscape 3 0.51x (base 0.51x, -0.1%) 0.09x (base 0.09x, +1.4%) ok
hashMapChurn 3 0.90x (base 1.18x, -23.6%) 0.06x (base 0.07x, -7.6%) ok
stringBuilding 3 0.87x (base 0.84x, +3.7%) 0.46x (base 0.46x, +0.2%) ok
recursion 3 1.24x (base 1.24x, +0.6%) 0.12x (base 0.12x, -1.7%) ok
quicksort 3 0.92x (base 1.01x, -9.1%) 0.11x (base 0.11x, +1.4%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 171 screenshots: 171 matched.
✅ Native Apple TV (tvOS, Metal) screenshot tests passed.

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 84000 ms
Simulator Boot (Run) 1000 ms
App Install 19000 ms
App Launch 16000 ms
Test Execution 448000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 175ms / native 5ms = 35.0x speedup
SIMD float-mul (64K x300) java 61ms / native 3ms = 20.3x 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 86.000 ms
Base64 CN1 decode 154.000 ms
Base64 native encode 2210.000 ms
Base64 encode ratio (CN1/native) 0.039x (96.1% faster)
Base64 native decode 862.000 ms
Base64 decode ratio (CN1/native) 0.179x (82.1% faster)
Base64 SIMD encode 109.000 ms
Base64 encode ratio (SIMD/CN1) 1.267x (26.7% slower)
Base64 SIMD decode 87.000 ms
Base64 decode ratio (SIMD/CN1) 0.565x (43.5% faster)
Base64 encode ratio (SIMD/native) 0.049x (95.1% faster)
Base64 decode ratio (SIMD/native) 0.101x (89.9% 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) 97.000 ms
Image applyMask (SIMD on) 541.000 ms
Image applyMask ratio (SIMD on/off) 5.577x (457.7% slower)
Image modifyAlpha (SIMD off) 54.000 ms
Image modifyAlpha (SIMD on) 91.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.685x (68.5% slower)
Image modifyAlpha removeColor (SIMD off) 99.000 ms
Image modifyAlpha removeColor (SIMD on) 98.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.990x (1.0% faster)

@shai-almog

shai-almog commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 236 screenshots: 236 matched.
✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.

@shai-almog

shai-almog commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 105000 ms
Simulator Boot (Run) 1000 ms
App Install 20000 ms
App Launch 1000 ms
Test Execution 546000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 219ms / native 3ms = 73.0x speedup
SIMD float-mul (64K x300) java 60ms / native 3ms = 20.0x 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 66.000 ms
Base64 CN1 decode 70.000 ms
Base64 native encode 1181.000 ms
Base64 encode ratio (CN1/native) 0.056x (94.4% faster)
Base64 native decode 458.000 ms
Base64 decode ratio (CN1/native) 0.153x (84.7% faster)
Base64 SIMD encode 53.000 ms
Base64 encode ratio (SIMD/CN1) 0.803x (19.7% faster)
Base64 SIMD decode 979.000 ms
Base64 decode ratio (SIMD/CN1) 13.986x (1298.6% slower)
Base64 encode ratio (SIMD/native) 0.045x (95.5% faster)
Base64 decode ratio (SIMD/native) 2.138x (113.8% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 21.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.143x (85.7% faster)
Image applyMask (SIMD off) 185.000 ms
Image applyMask (SIMD on) 1399.000 ms
Image applyMask ratio (SIMD on/off) 7.562x (656.2% slower)
Image modifyAlpha (SIMD off) 627.000 ms
Image modifyAlpha (SIMD on) 46.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.073x (92.7% faster)
Image modifyAlpha removeColor (SIMD off) 416.000 ms
Image modifyAlpha removeColor (SIMD on) 57.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.137x (86.3% faster)

@shai-almog
shai-almog merged commit f1b31b4 into master Oct 24, 2026
69 checks passed
@shai-almog
shai-almog deleted the ios-rotate-under-native-modal-6080 branch October 24, 2026 02:57
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.

[IOS] UI corruption after rotating inside native photo/video capture and accepting the result

1 participant