Skip to content

Backend: close the gaps found porting BuildCloud (#6153) - #6158

Open
shai-almog wants to merge 17 commits into
masterfrom
backend-gaps-6153
Open

shai-almog wants to merge 17 commits into
masterfrom
backend-gaps-6153

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Closes #6153: the backend gaps found while porting BuildCloud.

  • Logging: com.codename1.backend.log -- Logger with {} placeholders, per-logger logging.level.*, a per-thread MDC cleared before each request.
  • Regex: backend-package relocates java.util.regex and String's regex members onto com.codename1.util.regex.
  • Typed JSON: Json.read(String, Class), readList, convert and Json.write(dto), through codecs the build generates for every class literal passed to them (bytecode scan) and installs at startup.
  • ORM: @Column(insertable/updatable) and @Lob; new CrudRepository methods and default repository methods.
  • Web: produces/consumes (415/406, a wildcard Content-Type is refused), @CrossOrigin, ResponseStatusException(int).
  • Class library: Semaphore, ConcurrentLinkedQueue, Flow, YearMonth, TemporalAdjusters, BigDecimal, InetAddress (literals and localhost).
  • XML: streaming pull parser (no DOCTYPE processing, so no XXE or entity expansion), element tree, XML property lists; ImageInfo for PNG/JPEG/GIF/WebP headers. Binary plists are refused.
  • HTTP/2 on the JVM: a client that requires HTTP/2 goes through java.net.http (reflectively, Java 11+ at run time), refuses an HTTP/1.1 answer, and bounds the body by size and time. Streamed exchanges stay HTTP/1.1.
  • Security: {sha256} encoder for legacy recovery codes, remember-me devices (user_agent, ip_address; schema version 12), configurable security table names with indexes named after them.

Reviewed adversarially in three rounds; the fixes it produced are in the last three commits.

Not covered: the security schema changes were tested on SQLite only.

🤖 Generated with Claude Code

shai-almog and others added 13 commits November 1, 2026 20:59
…es/consumes, @crossorigin

Part of #6153: @column(insertable/updatable), @lob accepted on string and
byte fields, CrudRepository delete/deleteAll/saveAll/findAllById/flush and
default methods in repository interfaces, consumes/produces on the mapping
annotations (415/406), a per-route @crossorigin policy that replaces the
global one for its route, and ResponseStatusException(int).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…djusters, BigDecimal, InetAddress (#6153)

Item 5 of #6153: classes the backend needed that the ParparVM class
library lacked. BigDecimal keeps its unscaled value as decimal digits,
since there is no java.math.BigInteger here. InetAddress resolves
address literals only; the backend's getaddrinfo lives in its own TCP
natives, so other host names throw UnknownHostException. LocalDate
gains with(TemporalAdjuster) and implements TemporalAdjuster.

JdkGapChecks holds all of them to HotSpot in the bulk conformance run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the shared engine

checkBackend now moves java.util.regex onto com.codename1.util.regex (the
java/util/regex rows of Relocation.JDK_SHIMS) and rewrites String's regex
members to StringRegex (the String rows of the client's rewrite rules), and
the regex package (all but REDebugCompiler) is @SharedWithBackend so it
ships in codenameone-backend. Issue #6153 item 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…generated codecs

The build finds the class literals the application hands to the typed Json
methods, writes a codec for each, and the entry point installs a generated
registry over them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er reader (#6153 items 6, 7)

com.codename1.backend.xml: XmlPullParser (XXE-safe by construction: DOCTYPE
skipped, only predefined and numeric entities, nesting capped), XmlElement,
PropertyLists (XML plists and the plist inside a signed provisioning profile).
com.codename1.backend.ImageInfo: PNG/JPEG/GIF/WebP format and dimensions from
the header, JPEG walked segment by segment to its SOFn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onfigurable table names

Recovery codes are verified through a DelegatingPasswordEncoder: new codes
are {pbkdf2-sha256}, imported {sha256} hex hashes verify in constant time,
and unprefixed hashes stay PBKDF2. Remember-me tokens record user agent and
client address (schema version 12), and repositories list a user's tokens
and revoke one by owner. Every cn1_* table name can be configured through
cn1.security.table.<name> or cn1.security.table-prefix, validated as a
safe SQL identifier.

Refs #6153 (item 9)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chema to version 12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…MDC reset, plist dates, registry codecs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 195 screenshots: 195 matched.

Native Android coverage

  • 📊 Line coverage: 19.19% (56042/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.15% (270036/1488151), branch 12.40% (19637/158314), complexity 10.37% (15815/152567), method 15.72% (11381/72383), class 27.89% (2236/8017)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 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/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 19.19% (56042/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.15% (270036/1488151), branch 12.40% (19637/158314), complexity 10.37% (15815/152567), method 15.72% (11381/72383), class 27.89% (2236/8017)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 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/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 136ms / native 249ms = 0.5x speedup
SIMD float-mul (64K x300) java 71ms / native 109ms = 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 81.000 ms
Base64 CN1 decode 76.000 ms
Base64 native encode 511.000 ms
Base64 encode ratio (CN1/native) 0.159x (84.1% faster)
Base64 native decode 344.000 ms
Base64 decode ratio (CN1/native) 0.221x (77.9% faster)
Image encode benchmark status skipped (SIMD unsupported)

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@github-actions

github-actions Bot commented Nov 2, 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)
    • ✅ compose-compat: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ desktop-compat-runtime: 0 findings (no issues)
    • ✅ fxml-compiler: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ javafx-compat: 0 findings (no issues)
    • ✅ project-model: 0 findings (no issues)
    • ✅ swing-compat: 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

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 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 57ms / native 6ms = 9.5x speedup
SIMD float-mul (64K x300) java 63ms / native 5ms = 12.6x 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 75.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 109.000 ms
Base64 encode ratio (SIMD/CN1) 1.453x (45.3% slower)
Base64 SIMD decode 103.000 ms
Base64 decode ratio (SIMD/CN1) 1.157x (15.7% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.444x (55.6% faster)
Image applyMask (SIMD off) 44.000 ms
Image applyMask (SIMD on) 41.000 ms
Image applyMask ratio (SIMD on/off) 0.932x (6.8% faster)
Image modifyAlpha (SIMD off) 42.000 ms
Image modifyAlpha (SIMD on) 19.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.452x (54.8% faster)
Image modifyAlpha removeColor (SIMD off) 36.000 ms
Image modifyAlpha removeColor (SIMD on) 20.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.556x (44.4% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline windows-x64@amd64-family-25-model-1-authenticamd)

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.39x (base 1.22x, +13.9%) 0.69x (base 0.58x, +18.3%) ok
translator (self) 4 0.72x (base 0.83x, -13.6%) 0.53x (base 0.54x, -1.8%) ok
intArithmetic 4 1.10x (base 1.10x, -0.0%) 0.06x (base 0.06x, +2.6%) ok
longArithmetic 4 1.14x (base 1.08x, +5.1%) 0.06x (base 0.05x, +3.4%) ok
mathTranscendental 4 0.78x (base 0.79x, -1.6%) 0.06x (base 0.06x, +2.8%) ok
arraySequential 4 1.28x (base 1.36x, -6.0%) 0.39x (base 0.39x, +0.2%) ok
arrayRandom 4 0.93x (base 1.06x, -12.4%) 0.23x (base 0.23x, +0.5%) ok
objectAllocation 4 1.49x (base 1.56x, -4.2%) 0.28x (base 0.39x, -27.4%) ok
valueEscape 4 0.10x (base 0.10x, +0.4%) 0.05x (base 0.04x, +2.6%) ok
hashMapChurn 4 1.87x (base 1.80x, +4.0%) 0.09x (base 0.09x, -2.3%) ok
stringBuilding 4 1.25x (base 1.22x, +3.0%) 0.27x (base 0.32x, -17.2%) ok
recursion 4 1.41x (base 1.49x, -5.8%) 0.06x (base 0.06x, +1.5%) ok
quicksort 4 1.11x (base 1.13x, -2.2%) 0.12x (base 0.12x, +0.9%) ok

Result: no regression

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 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 60.000 ms
Base64 CN1 decode 73.000 ms
Base64 SIMD encode 92.000 ms
Base64 encode ratio (SIMD/CN1) 1.533x (53.3% slower)
Base64 SIMD decode 77.000 ms
Base64 decode ratio (SIMD/CN1) 1.055x (5.5% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 6.000 ms
Image createMask ratio (SIMD on/off) 0.667x (33.3% faster)
Image applyMask (SIMD off) 24.000 ms
Image applyMask (SIMD on) 19.000 ms
Image applyMask ratio (SIMD on/off) 0.792x (20.8% faster)
Image modifyAlpha (SIMD off) 23.000 ms
Image modifyAlpha (SIMD on) 15.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.652x (34.8% faster)
Image modifyAlpha removeColor (SIMD off) 25.000 ms
Image modifyAlpha removeColor (SIMD on) 15.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.600x (40.0% faster)

…res never links SecuritySchema

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

github-actions Bot commented Nov 2, 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)

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

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 908 total, 0 failed, 55 skipped

Benchmark Results

  • Execution Time: 7999 ms

  • Hotspots (Top 20 sampled methods):

    • 11.20% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (136 samples)
    • 7.17% java.lang.System.identityHashCode (87 samples)
    • 6.75% java.lang.Object.hashCode (82 samples)
    • 5.52% java.util.ArrayList.indexOf (67 samples)
    • 2.88% com.codename1.tools.translator.IteratorEscape.mangle (35 samples)
    • 2.72% com.codename1.tools.translator.BytecodeMethod.equals (33 samples)
    • 2.64% java.util.AbstractCollection.containsAll (32 samples)
    • 2.55% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (31 samples)
    • 2.22% java.lang.StringBuilder.append (27 samples)
    • 1.65% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (20 samples)
    • 1.65% java.util.HashMap.hash (20 samples)
    • 1.57% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (19 samples)
    • 1.48% java.io.FileOutputStream.writeBytes (18 samples)
    • 1.32% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (16 samples)
    • 1.24% com.codename1.tools.translator.NativeSymbolIndex.<init> (15 samples)
    • 1.15% java.util.HashMap.putVal (14 samples)
    • 1.15% com.codename1.tools.translator.Parser.cullMethods (14 samples)
    • 1.07% java.lang.String.equals (13 samples)
    • 0.99% com.codename1.tools.translator.DeadFieldElimination.run (12 samples)
    • 0.91% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (11 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.

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 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)

1 improvement past the baseline (not a failure; rebaseline to lock it in):

  • translator (self) on all 4 CPUs: time 0.50x against a 0.64x baseline (-21.9%, 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 (LinuxHelloMain) 4 0.93x (base 0.85x, +10.2%) 0.73x (base 0.83x, -13.1%) ok
translator (self) 4 0.50x (base 0.64x, -21.9%) 0.47x (base 0.52x, -9.8%) improved: rebaseline to lock in (time -21.9%)
intArithmetic 4 1.10x (base 1.12x, -1.2%) 0.04x (base 0.06x, -29.9%) ok
longArithmetic 4 1.08x (base 1.08x, -0.0%) 0.04x (base 0.05x, -29.4%) ok
mathTranscendental 4 1.08x (base 1.08x, -0.1%) 0.04x (base 0.07x, -44.5%) ok
arraySequential 4 2.11x (base 2.00x, +5.2%) 0.36x (base 0.36x, +0.6%) ok
arrayRandom 4 1.00x (base 0.91x, +10.1%) 0.20x (base 0.21x, -3.2%) ok
objectAllocation 4 1.56x (base 1.65x, -5.1%) 0.27x (base 0.35x, -24.7%) ok
valueEscape 4 0.10x (base 0.10x, -0.3%) 0.03x (base 0.04x, -26.6%) ok
hashMapChurn 4 1.52x (base 1.48x, +2.7%) 0.09x (base 0.09x, -0.2%) ok
stringBuilding 4 1.40x (base 1.39x, +0.5%) 0.26x (base 0.31x, -17.0%) ok
recursion 4 1.39x (base 1.25x, +10.5%) 0.04x (base 0.08x, -48.3%) ok
quicksort 4 1.09x (base 1.07x, +1.4%) 0.10x (base 0.11x, -12.5%) ok

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

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

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 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.94x (base 1.02x, -8.0%) 0.76x (base 0.66x, +15.6%) ok
translator (self) 4 0.73x (base 0.70x, +4.4%) 0.44x (base 0.43x, +1.8%) ok
intArithmetic 4 1.05x (base 1.04x, +0.0%) 0.03x (base 0.03x, +4.6%) ok
longArithmetic 4 0.79x (base 0.79x, -0.2%) 0.03x (base 0.03x, +5.0%) ok
mathTranscendental 4 1.09x (base 1.10x, -0.3%) 0.04x (base 0.03x, +9.5%) ok
arraySequential 4 0.35x (base 0.36x, -4.0%) 0.37x (base 0.37x, +0.2%) ok
arrayRandom 4 0.94x (base 0.94x, +0.5%) 0.20x (base 0.20x, +0.6%) ok
objectAllocation 4 1.92x (base 1.77x, +8.7%) 0.39x (base 0.37x, +6.1%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, +6.1%) ok
hashMapChurn 4 0.86x (base 0.84x, +2.3%) 0.12x (base 0.12x, -4.8%) ok
stringBuilding 4 1.41x (base 1.57x, -10.1%) 0.32x (base 0.26x, +20.3%) ok
recursion 4 1.55x (base 1.43x, +8.1%) 0.04x (base 0.04x, +3.2%) ok
quicksort 4 1.00x (base 0.99x, +0.6%) 0.09x (base 0.09x, +1.2%) ok

Result: no regression

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 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 49ms / native 3ms = 16.3x speedup
SIMD float-mul (64K x300) java 48ms / native 3ms = 16.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 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) 6.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.167x (83.3% faster)
Image applyMask (SIMD off) 17.000 ms
Image applyMask (SIMD on) 17.000 ms
Image applyMask ratio (SIMD on/off) 1.000x (0.0% slower)
Image modifyAlpha (SIMD off) 17.000 ms
Image modifyAlpha (SIMD on) 8.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.471x (52.9% faster)
Image modifyAlpha removeColor (SIMD off) 15.000 ms
Image modifyAlpha removeColor (SIMD on) 10.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.667x (33.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 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.04x (base 1.11x, -6.1%) 0.72x (base 0.75x, -4.8%) ok
translator (self) 4 0.88x (base 0.84x, +4.5%) 0.48x (base 0.51x, -4.2%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.06x (base 0.06x, +3.3%) ok
longArithmetic 4 0.80x (base 0.80x, +0.1%) 0.06x (base 0.06x, +3.8%) ok
mathTranscendental 4 0.75x (base 0.72x, +3.7%) 0.07x (base 0.06x, +2.0%) ok
arraySequential 4 0.40x (base 0.46x, -11.3%) 0.39x (base 0.39x, -0.1%) ok
arrayRandom 4 0.93x (base 0.94x, -0.3%) 0.23x (base 0.23x, +0.3%) ok
objectAllocation 4 1.80x (base 1.82x, -1.3%) 0.40x (base 0.43x, -7.3%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +2.3%) ok
hashMapChurn 4 1.00x (base 0.98x, +1.0%) 0.11x (base 0.12x, -8.8%) ok
stringBuilding 4 1.54x (base 1.43x, +7.9%) 0.27x (base 0.27x, -0.2%) ok
recursion 4 1.54x (base 1.46x, +5.1%) 0.07x (base 0.07x, +1.6%) ok
quicksort 4 1.00x (base 1.00x, -0.2%) 0.12x (base 0.12x, +0.8%) ok

Result: no regression

@shai-almog

shai-almog commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

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 54ms / native 3ms = 18.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 active (NEON-accelerated)
Base64 CN1 encode 64.000 ms
Base64 CN1 decode 75.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 11.000 ms
Image createMask (SIMD on) 8.000 ms
Image createMask ratio (SIMD on/off) 0.727x (27.3% faster)
Image applyMask (SIMD off) 78.000 ms
Image applyMask (SIMD on) 73.000 ms
Image applyMask ratio (SIMD on/off) 0.936x (6.4% faster)
Image modifyAlpha (SIMD off) 90.000 ms
Image modifyAlpha (SIMD on) 61.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.678x (32.2% faster)
Image modifyAlpha removeColor (SIMD off) 66.000 ms
Image modifyAlpha removeColor (SIMD on) 103.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.561x (56.1% slower)

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.82x (base 0.96x, -14.6%) 0.83x (base 0.93x, -10.4%) ok
translator (self) 3 0.59x (base 0.62x, -6.1%) 0.86x (base 0.78x, +10.2%) ok
intArithmetic 3 1.10x (base 1.03x, +6.5%) 0.12x (base 0.12x, +1.7%) ok
longArithmetic 3 1.04x (base 1.03x, +1.3%) 0.12x (base 0.07x, +64.8%) ok
mathTranscendental 3 0.99x (base 1.01x, -1.4%) 0.12x (base 0.12x, +1.4%) ok
arraySequential 3 0.46x (base 0.42x, +8.4%) 0.53x (base 0.53x, +0.3%) ok
arrayRandom 3 0.98x (base 0.99x, -0.5%) 0.25x (base 0.32x, -23.5%) ok
objectAllocation 3 1.06x (base 1.11x, -4.0%) 0.59x (base 0.72x, -18.7%) ok
valueEscape 3 0.51x (base 0.51x, +0.6%) 0.09x (base 0.09x, +2.9%) ok
hashMapChurn 3 0.89x (base 1.18x, -24.3%) 0.06x (base 0.07x, -4.6%) ok
stringBuilding 3 0.89x (base 0.84x, +5.6%) 0.46x (base 0.46x, -0.7%) ok
recursion 3 1.25x (base 1.24x, +1.1%) 0.12x (base 0.12x, +0.4%) ok
quicksort 3 0.99x (base 1.01x, -1.9%) 0.11x (base 0.11x, -1.0%) ok

Result: no regression

shai-almog and others added 2 commits November 3, 2026 04:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ames

ElementCollection can name its owner column and declare the value column's
SQL type, which reaches CREATE TABLE and the schema report. A name wrapped in
backticks or double quotes is unwrapped, since the runtime quotes every
identifier itself and the quotes otherwise became part of the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Backend gaps found porting to the Codename One Backend 7.0.280

1 participant