Repository navigation
ParparVM and Python support: speedups and fixes - #6346
shai-almog wants to merge 29 commits into
Conversation
…hing and SQLite speedups Collects the transpiler, runtime, build and core changes made while running large real-world Python packages through the toolchain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nstance narrowing, no global codegen switches or debug output, fresh column shape after re-prepare, SQL function table lifetime and thread safety, close races Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng, enum descriptors are not members, reset cached statement bindings, drop the SQLite read hold, reuse freed SQL function slots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… free their slots, lower only soupsieve's own Immutable constructor, refuse keyword stores into possible descriptors, clear PMD findings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… when every binding of that name is inert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d order, inert() sees every binding, soupsieve eq/repr matched by what they read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ogram-module import match is exact, astral characters escape as one code point Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p a dangling developer-guide include Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 12 screenshots: 12 matched. |
Cloudflare Preview
|
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 303 screenshots: 303 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: AMD64 Family 25 Model 17 Stepping 1, AuthenticAMD (baseline 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
Result: no regression |
|
Compared 303 screenshots: 303 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline 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
Result: no regression |
|
Compared 287 screenshots: 287 matched. |
…acks in the native ports - A build with no main module prunes from the application's own modules, so unused classes of bundled modules are neither compiled nor refused in strict mode; strict refusals still cover every module. - Concurrent GC cycles give pre-cycle pages their grace again, as on master. - CHECKCAST and INSTANCEOF on a reference array type emit its array id (bulk check ArrayTypeChecks). - The Windows and Linux SQL function callback lives in the Native class the clean target translates. - vm/backend's JavaSE twin keeps sqlite-jdbc in a separate source root found by ServiceLoader. - The bound-statement fast path never skips the conditional-DDL rewrite (SQL Server and Oracle). - No uninitialized-read warning from the shared catch dispatch. - A base class without a vtable shares no dispatch thunk. - Range-checked narrowing in shifts, regex positions and CRC32. - Generated BackendDb import names com.codename1.db.sql. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…viceRunner Master disabled Chart2SharedTooltipScreenshotTest but kept its goldens, so every screenshot leg reported it as 'Actual screenshot missing' and the port-status strict gate failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t; ignore commented-out tests registered_tests() counted the commented-out 'new Chart2SharedTooltipScreenshotTest()' as registered, so the manifest had to keep the test and every port reported it not-run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ParparVM conformance job builds every conformance program into one native program. Several passes keyed their facts by bare name across the whole program, so one program's `self.n = v`, its own `fill()` or `_inherited`, or a same-named class made an unrelated program's code look dynamic and strict mode refused it. - WholeProgram/Infer: a store rebinds a module global only when its receiver may be a module (not a method's self, a once-bound instance global, a local made by __new__ or reached through self, a generated _cn1_ receiver, or object.__setattr__). - ConstArgSpecialize, DictItemsSetattr, SetNameDescriptor, ThreadLocalLowering: judged per group of modules connected by imports. - LoopUnroll: a computed base no longer blocks a same-named class of another module. - dateutil.relativedelta names its four time fields instead of a getattr loop, which strict mode refused wherever __add__ is live. - conformance_parparvm.sh skips programs strict mode must refuse; the guide's build-output and shim examples are literal blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks:
|
|
Compared 380 screenshots: 380 matched. |
|
Compared 288 screenshots: 288 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
|
Compared 303 screenshots: 303 matched. Benchmark ResultsDetailed Performance Metrics
|
|
Compared 289 screenshots: 289 matched. Benchmark Results
Detailed Performance Metrics
ParparVM vs HotSpot (JDK 25): macOS arm64Runner CPU: Apple M1 (Virtual) (baseline 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
Result: no regression |
|
Compared 303 screenshots: 303 matched. ParparVM vs HotSpot (JDK 25): Linux x64Runner CPU: Intel(R) Xeon(R) 6975P-C (baseline 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
Result: no regression |
|
Compared 303 screenshots: 303 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline 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
Result: no regression |
…es; join isinstance narrowings over every walk A nested async def after a loop had its states retargeted by the outer generator's jump threading and jumped to a state it does not have. A read narrowed by isinstance kept the narrowing from an early walk after the class parameter widened, so the typed body cast to the first caller's class. Also: PMD in SqlFunctionRegistrar, a Vale wordiness hit, and the linux-arm64 hello RAM row rebaselined for workload growth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only modules inside a package lose their if __name__ == "__main__" block. A top-level file can be run as __main__ through the generated exec(runName), which the native conformance run does for every program. The kwonly_logging program also restores the root logger, since that run shares one process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
…hout it The native conformance binary holds every program, and its ThinLTO link was killed at the 16 GB of a CI runner, taking the runner with it. Under the same 4 CPU / 16 GB cap the build without ThinLTO peaks at 1.4 GB and every program matches. Application builds keep ThinLTO by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parparvm-tests.yml is gone on master (folded into ci.yml); the two JSON sources this branch added to its paths go into linux-build-run's members in .github/ci/ci-members.json instead. Chart2SharedTooltipScreenshotTest is master's: re-enabled with its goldens and manifest entries. The CN1_THIN_LTO option landed on master too; master's block is kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native fidelity (Android, Material 3)54 pairs compared -- median 95.6%, worst 91.3% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
|
Compared 286 screenshots: 286 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
…noise, fidelity Xcode - macOS goldens were captured on macos-15; the leg now runs on xcode-27, whose text antialiasing differs and whose title bar is 4px taller. Reseeded from run 46363906152's captures after checking each diff. - ValidatorLightweightPicker caught the focused field's blinking caret on one run and not another; the caret is now kept off. - One step builds the watch and tvOS targets (14 + 17 min as separate jobs on macos-15); the 30-minute limit was for one target. - The perf gate ran with the iOS/watch/tv simulators still booted on a 3-core runner; shut them down first. - Fidelity ran unpinned on Xcode 27.2 while its goldens and every other step of the job use 27.1; pinned, and the launch output and any crash report are now kept instead of discarded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The branch's cheaper generated code drained each worker's ready set before the client's next request arrived, so the reactor slept in epoll_wait three times as often and the backend gate measured 0.957 of Rust against 0.97. Measured on the gate's runner class with a dedicated probe job. 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>
This reverts commit 91e9f1f.
website-docs.yml builds the site on JDK 25; under tools/env.sh's JDK 8 the skin designer (release 17) cannot compile. And the installed snapshots were reused unless the branch's own diff touched core, so after a master merge they lacked master's new API; they are now keyed on the source tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as CI does Without WEBSITE_BOOTSTRAP_CN1_SNAPSHOTS the skin designer built with the pinned release plugin, which compiles today's JavaScript port against an old core (817 errors). The gate installs the snapshots itself, so build.sh skips setup-workspace.sh and its writes outside the checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…recorded build.sh unzips the site's JavaScript apps into docs/website/static and restamps cn1libs.json on every run; the gate then refused to record a pass that had no failures. The app directories are ignored, and the restamp is undone after the build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>














































































































ParparVM and Python support: speedups and fixes
Improvements to ParparVM, the Python transpiler and runtime, and the core and port SQLite layers, found by running large real-world Python packages through the toolchain.
ParparVM
b[i]..b[i+7], so clang can merge the loads (BytecodeMethod,ArrayLoadExpression,ConstantIndexRunChecks,cn1_globals.h).cn1_intrinsics.h,InlineIntrinsics) and code generation improvements inByteCodeClass,Parser,TypeInstruction,VarOp,CustomInvokeandTryCatch.Stringsearch methods (nativeMethods.m,vm/JavaAPI/String.java), with their JavaScript bindings.cn1_globals.m; the translator's SQLite layer (cn1_db_sqlite_impl.h).Db: SQL functions, a column-name cache keyed on SQLite's re-prepare counter (SQLITE_STMTSTATUS_REPREPARE), and aclose()that checks and takes the gate in one step.Python transpiler
isinstancenarrowing is refused for classes with__subclasshook__/__instancecheck__,typing.castnarrows nothing, and a global another module reassigns is widened.long/doublefast paths that overflow-check and follow Python's sign rules for%and//.OptionalAttribute/ZeroOrOne, soupsieve'sImmutable,**kwattribute stores, enum members and constructor-argument specialization. Each one refuses to apply, and fails the build naming the line, rather than miscompile.Liveness) keeps import-time effects.Python runtime and build
sqlite3on the Codename One database API, and stdlib fixes.importlib.metadatadata.Core and ports
MessageDigestImpl(MD5/SHA-1/SHA-2/SHA-3/BLAKE2), CRC32 slice-by-8 and PBKDF2 are faster.Database.createFunction;Test plan
maven/backendverify): 1453, 0 failurescheck-cast-semantics.shclean (no new baseline entries);check-control-characters.pyclean🤖 Generated with Claude Code