Skip to content

Link UniformTypeIdentifiers on iOS, and gate the frameworks the port needs - #5776

Merged
shai-almog merged 1 commit into
masterfrom
ios-uniformtypeidentifiers-link
Sep 11, 2026
Merged

shai-almog merged 1 commit into
masterfrom
ios-uniformtypeidentifiers-link

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

The bug

Every iOS device archive fails at the link:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_UTType", referenced from:
       in 866.arm64.thinlto.o
ld: symbol(s) not found for architecture arm64
** ARCHIVE FAILED **

ByteCodeTranslator treated UniformTypeIdentifiers.framework as the macOS spelling of MobileCoreServices and linked it on that branch alone:

if (platform.hasIosDeviceIdioms()) {
    ...
    includeFrameworks.add("MobileCoreServices.framework");
} else {
    includeFrameworks.add("UniformTypeIdentifiers.framework");   // macOS only
}

It is not the same framework. MobileCoreServices carries only the deprecated C functions (UTTypeCreatePreferredIdentifierForTag); the UTType class lives in UniformTypeIdentifiers on every platform from iOS 14 / macOS 11 / watchOS 7 / tvOS 14. CN1DragAndDrop.m compiles that class into every slice — the MIME-to-identifier mapping sits outside its UIKit guard because the clipboard natives need it too.

Two commits collided: #5601 wrote the either/or split, #5662 later introduced the UTType use. Neither is wrong alone.

The fix

Link it on all slices, weakly — ios.deployment_target reaches back before the framework existed, and a hard link against one the device lacks kills the process at launch; the uses are already @available fenced. Classified in WatchNativeBuilder as linkable, verified present in both watch SDKs.

Why no CI job caught it

Every iOS job was green for five days, and structurally had to be. Nothing declares the framework there either — I pulled the link line out of the last green master nightly and it has no -framework UniformTypeIdentifiers. The sample supplies it by accident, three ways a plain application does not have:

  • a Swift autolink hint — the sample has Swift in its app target, and import SwiftUI makes swiftc stamp -framework UniformTypeIdentifiers into the object as an LC_LINKER_OPTION
  • CLANG_ENABLE_MODULES — IPhoneBuilder turns it on for the Metal build, so the same source links there and fails on the GL one
  • CocoaPods dependencies already on the link line

The gate

scripts/check-ios-framework-links.py runs over the project build-ios-app.sh has already generated (seconds, no extra build) and answers one question: every symbol our natives reference that an SDK framework defines — is it defined by a framework this project declares?

It compiles the port's natives with the project's own settings (prefix header, defines, per-file -fobjc-arc, modules where the project asks) and resolves the undefined symbols against the declared set alone. Autolink cannot hide anything from it — a hint is a load command, not a definition, so nm still reports the symbol undefined, and the probe it links to confirm a finding carries no hints at all.

Two deliberate properties: a native that fails to compile is fatal rather than skipped (a partial set reporting success is the failure mode this replaces), and the SDK symbol index self-tests against a floor plus two known symbols, because a text index that parses to nothing reports every project clean.

Wired into build-ios and build-ios-metal.

Verification

  • Gate bites: with the post-Native operating system drag and drop, carrying the clipboard's own payload #5662 source injected into a project that does not declare the framework, it fails naming UniformTypeIdentifiers.framework / _OBJC_CLASS_$_UTType; declaring it on the app target makes it pass. 79 of 79 port natives compile, 623 SDK symbols examined, 556k symbols indexed.
  • Link A/B with the real CN1DragAndDrop.m at arm64-apple-ios15.0, only CN1's own callbacks stubbed so every system symbol had to resolve for real: undefined without the framework, resolved with -weak_framework UniformTypeIdentifiers.
  • Generated project carries it in PBXFrameworksBuildPhase with ATTRIBUTES = (Weak).
  • WatchNativeBuilderTest 49/49, SpotBugs 0 findings on ByteCodeTranslator.

Ruled out on the way: device-vs-simulator, Debug-vs-Release, LTO, and deployment target — the simulator link fails identically.

…needs

ByteCodeTranslator treated UniformTypeIdentifiers.framework as the macOS
spelling of MobileCoreServices and linked it on that branch alone. It is not:
MobileCoreServices carries only the deprecated C functions, while the UTType
class lives in UniformTypeIdentifiers on every platform from iOS 14 / macOS 11 /
watchOS 7 / tvOS 14.

CN1DragAndDrop.m compiles that class into every slice -- its MIME-to-identifier
mapping sits outside the UIKit guard because the clipboard natives need it too
-- so an iOS application referenced _OBJC_CLASS_$_UTType with nothing defining
it, and every device archive failed at the link.

Link it on all slices, weakly: ios.deployment_target reaches back before the
framework existed and a hard link against one the device lacks kills the process
at launch, while the uses are already @available fenced. Classified in
WatchNativeBuilder as linkable, verified present in both watch SDKs.

Why no CI job caught it
-----------------------

Every iOS job was green for five days, and structurally had to be. Nothing
declared the framework there either -- the sample application supplies it by
accident, three ways a plain application does not have:

  - a Swift autolink hint, since the sample has Swift in its app target and
    `import SwiftUI` stamps -framework UniformTypeIdentifiers into the object
  - CLANG_ENABLE_MODULES, which IPhoneBuilder turns on for the Metal build, so
    the same source links there and fails on the GL one
  - CocoaPods dependencies on the link line

scripts/check-ios-framework-links.py closes that. It runs over the project
build-ios-app.sh has already generated, compiles the port's natives with the
project's own settings, and resolves their undefined symbols against the
frameworks the project DECLARES -- never against an autolink hint, which is a
load command rather than a definition and so cannot hide a symbol from nm. A
native that fails to compile is fatal rather than skipped, and the SDK symbol
index self-tests, because both of those failure modes report success.

Verified: with the post-#5662 source injected into a project that does not
declare the framework the gate fails naming UniformTypeIdentifiers.framework and
_OBJC_CLASS_$_UTType; declaring it on the app target makes the gate pass. 79 of
79 port natives compile, 623 SDK symbols examined. The link itself was A/B'd
with the real CN1DragAndDrop.m for arm64-apple-ios15.0: undefined without the
framework, resolved with -weak_framework UniformTypeIdentifiers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 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-09-11T19:54:38.288322Z 7ea24ed PR opened
ℹ️ 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.

@shai-almog

shai-almog commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 166 screenshots: 166 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 61ms / native 4ms = 15.2x speedup
SIMD float-mul (64K x300) java 71ms / native 4ms = 17.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 192.000 ms
Base64 CN1 decode 126.000 ms
Base64 SIMD encode 100.000 ms
Base64 encode ratio (SIMD/CN1) 0.521x (47.9% faster)
Base64 SIMD decode 94.000 ms
Base64 decode ratio (SIMD/CN1) 0.746x (25.4% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 36.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.083x (91.7% faster)
Image applyMask (SIMD off) 35.000 ms
Image applyMask (SIMD on) 60.000 ms
Image applyMask ratio (SIMD on/off) 1.714x (71.4% slower)
Image modifyAlpha (SIMD off) 40.000 ms
Image modifyAlpha (SIMD on) 24.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.600x (40.0% faster)
Image modifyAlpha removeColor (SIMD off) 34.000 ms
Image modifyAlpha removeColor (SIMD on) 23.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.676x (32.4% faster)

@shai-almog

shai-almog commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 166 screenshots: 166 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 62ms / native 5ms = 12.4x 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 193.000 ms
Base64 CN1 decode 133.000 ms
Base64 SIMD encode 111.000 ms
Base64 encode ratio (SIMD/CN1) 0.575x (42.5% faster)
Base64 SIMD decode 99.000 ms
Base64 decode ratio (SIMD/CN1) 0.744x (25.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 10.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.300x (70.0% faster)
Image applyMask (SIMD off) 41.000 ms
Image applyMask (SIMD on) 60.000 ms
Image applyMask ratio (SIMD on/off) 1.463x (46.3% slower)
Image modifyAlpha (SIMD off) 31.000 ms
Image modifyAlpha (SIMD on) 42.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.355x (35.5% slower)
Image modifyAlpha removeColor (SIMD off) 39.000 ms
Image modifyAlpha removeColor (SIMD on) 51.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.308x (30.8% slower)

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 151 screenshots: 151 matched.

Native Android coverage

  • 📊 Line coverage: 9.26% (9203/99417 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.01% (47273/524920), branch 3.57% (1777/49739), complexity 3.54% (1877/53026), method 5.44% (1517/27888), class 10.92% (408/3736)
    • 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)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 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)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 9.26% (9203/99417 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.01% (47273/524920), branch 3.57% (1777/49739), complexity 3.54% (1877/53026), method 5.44% (1517/27888), class 10.92% (408/3736)
    • 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)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 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)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 234ms / native 185ms = 1.2x speedup
SIMD float-mul (64K x300) java 138ms / native 146ms = 0.9x 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 114.000 ms
Base64 CN1 decode 104.000 ms
Base64 native encode 417.000 ms
Base64 encode ratio (CN1/native) 0.273x (72.7% faster)
Base64 native decode 350.000 ms
Base64 decode ratio (CN1/native) 0.297x (70.3% faster)
Image encode benchmark status skipped (SIMD unsupported)

@github-actions

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)
    • ✅ build-hint-catalog: 0 findings (no issues)
    • ✅ build-hint-tools: 0 findings (no issues)
    • ✅ codenameone-maven-plugin: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ ios: 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 Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 166 screenshots: 166 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.

@shai-almog

shai-almog commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 166 screenshots: 166 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.

@shai-almog

shai-almog commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 166 screenshots: 166 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 54ms / native 4ms = 13.5x 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 gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 265.000 ms
Base64 CN1 decode 156.000 ms
Base64 SIMD encode 65.000 ms
Base64 encode ratio (SIMD/CN1) 0.245x (75.5% faster)
Base64 SIMD decode 63.000 ms
Base64 decode ratio (SIMD/CN1) 0.404x (59.6% 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) 55.000 ms
Image applyMask (SIMD on) 45.000 ms
Image applyMask ratio (SIMD on/off) 0.818x (18.2% faster)
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) 21.000 ms
Image modifyAlpha removeColor (SIMD on) 39.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.857x (85.7% slower)

@shai-almog

shai-almog commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

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

Benchmark Results

  • Execution Time: 23088 ms

  • Hotspots (Top 20 sampled methods):

    • 20.34% java.util.ArrayList.indexOf (410 samples)
    • 10.22% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (206 samples)
    • 3.77% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (76 samples)
    • 3.67% com.codename1.tools.translator.Parser.cn1EnsureSubclassIndex (74 samples)
    • 2.73% com.codename1.tools.translator.BytecodeMethod.optimize (55 samples)
    • 2.53% java.lang.StringBuilder.append (51 samples)
    • 2.48% org.objectweb.asm.tree.analysis.Analyzer.analyze (50 samples)
    • 2.13% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (43 samples)
    • 1.93% com.codename1.tools.translator.Parser.classIndex (39 samples)
    • 1.79% java.lang.Object.hashCode (36 samples)
    • 1.69% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (34 samples)
    • 1.39% org.objectweb.asm.tree.analysis.Analyzer.findSubroutine (28 samples)
    • 1.39% java.util.HashMap.hash (28 samples)
    • 1.14% java.lang.String.equals (23 samples)
    • 1.04% com.codename1.tools.translator.BytecodeMethod.appendCMethodPrefix (21 samples)
    • 1.04% org.objectweb.asm.ClassReader.readCode (21 samples)
    • 0.99% java.lang.System.identityHashCode (20 samples)
    • 0.84% java.util.TreeMap.getEntry (17 samples)
    • 0.84% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (17 samples)
    • 0.79% com.codename1.tools.translator.Parser.cullMethods (16 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 merged commit 11e5f0b into master Sep 11, 2026
60 checks passed
@shai-almog
shai-almog deleted the ios-uniformtypeidentifiers-link branch September 11, 2026 21:41
@shai-almog

shai-almog commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 68ms / native 3ms = 22.6x speedup
SIMD float-mul (64K x300) java 56ms / native 3ms = 18.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 active (NEON-accelerated)
Base64 CN1 encode 162.000 ms
Base64 CN1 decode 102.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 18.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.222x (77.8% faster)
Image applyMask (SIMD off) 190.000 ms
Image applyMask (SIMD on) 62.000 ms
Image applyMask ratio (SIMD on/off) 0.326x (67.4% faster)
Image modifyAlpha (SIMD off) 50.000 ms
Image modifyAlpha (SIMD on) 36.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.720x (28.0% faster)
Image modifyAlpha removeColor (SIMD off) 46.000 ms
Image modifyAlpha removeColor (SIMD on) 38.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.826x (17.4% faster)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 63ms / native 3ms = 21.0x speedup
SIMD float-mul (64K x300) java 56ms / native 3ms = 18.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 244.000 ms
Base64 CN1 decode 117.000 ms
Base64 native encode 679.000 ms
Base64 encode ratio (CN1/native) 0.359x (64.1% faster)
Base64 native decode 263.000 ms
Base64 decode ratio (CN1/native) 0.445x (55.5% faster)
Base64 SIMD encode 67.000 ms
Base64 encode ratio (SIMD/CN1) 0.275x (72.5% faster)
Base64 SIMD decode 50.000 ms
Base64 decode ratio (SIMD/CN1) 0.427x (57.3% faster)
Base64 encode ratio (SIMD/native) 0.099x (90.1% faster)
Base64 decode ratio (SIMD/native) 0.190x (81.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) 51.000 ms
Image applyMask (SIMD on) 35.000 ms
Image applyMask ratio (SIMD on/off) 0.686x (31.4% faster)
Image modifyAlpha (SIMD off) 36.000 ms
Image modifyAlpha (SIMD on) 36.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.000x (0.0% slower)
Image modifyAlpha removeColor (SIMD off) 32.000 ms
Image modifyAlpha removeColor (SIMD on) 29.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.906x (9.4% faster)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 89000 ms
Simulator Boot (Run) 1000 ms
App Install 19000 ms
App Launch 5000 ms
Test Execution 422000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 78ms / native 4ms = 19.5x speedup
SIMD float-mul (64K x300) java 86ms / native 4ms = 21.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 220.000 ms
Base64 CN1 decode 120.000 ms
Base64 native encode 677.000 ms
Base64 encode ratio (CN1/native) 0.325x (67.5% faster)
Base64 native decode 303.000 ms
Base64 decode ratio (CN1/native) 0.396x (60.4% faster)
Base64 SIMD encode 50.000 ms
Base64 encode ratio (SIMD/CN1) 0.227x (77.3% faster)
Base64 SIMD decode 55.000 ms
Base64 decode ratio (SIMD/CN1) 0.458x (54.2% faster)
Base64 encode ratio (SIMD/native) 0.074x (92.6% faster)
Base64 decode ratio (SIMD/native) 0.182x (81.8% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 8.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.125x (87.5% faster)
Image applyMask (SIMD off) 55.000 ms
Image applyMask (SIMD on) 40.000 ms
Image applyMask ratio (SIMD on/off) 0.727x (27.3% faster)
Image modifyAlpha (SIMD off) 50.000 ms
Image modifyAlpha (SIMD on) 36.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.720x (28.0% faster)
Image modifyAlpha removeColor (SIMD off) 38.000 ms
Image modifyAlpha removeColor (SIMD on) 132.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 3.474x (247.4% slower)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 143 screenshots: 143 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 90000 ms
Simulator Boot (Run) 1000 ms
App Install 18000 ms
App Launch 1000 ms
Test Execution 593000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 82ms / native 5ms = 16.4x speedup
SIMD float-mul (64K x300) java 114ms / native 4ms = 28.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 255.000 ms
Base64 CN1 decode 296.000 ms
Base64 native encode 2072.000 ms
Base64 encode ratio (CN1/native) 0.123x (87.7% faster)
Base64 native decode 1094.000 ms
Base64 decode ratio (CN1/native) 0.271x (72.9% faster)
Base64 SIMD encode 136.000 ms
Base64 encode ratio (SIMD/CN1) 0.533x (46.7% faster)
Base64 SIMD decode 80.000 ms
Base64 decode ratio (SIMD/CN1) 0.270x (73.0% faster)
Base64 encode ratio (SIMD/native) 0.066x (93.4% faster)
Base64 decode ratio (SIMD/native) 0.073x (92.7% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 89.000 ms
Image createMask (SIMD on) 18.000 ms
Image createMask ratio (SIMD on/off) 0.202x (79.8% faster)
Image applyMask (SIMD off) 533.000 ms
Image applyMask (SIMD on) 269.000 ms
Image applyMask ratio (SIMD on/off) 0.505x (49.5% faster)
Image modifyAlpha (SIMD off) 743.000 ms
Image modifyAlpha (SIMD on) 426.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.573x (42.7% faster)
Image modifyAlpha removeColor (SIMD off) 351.000 ms
Image modifyAlpha removeColor (SIMD on) 818.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 2.330x (133.0% slower)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

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.

1 participant