leptris 1.9.422.0 → 1.9.424.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0476ebb6cd36f5febcb657f57fa3e79709f2ae8322a50829e4deaf7aa33a76a2
4
- data.tar.gz: 3f0e93cbf5e5f1320285dc9d4d1fcf633d75273beb9585caa9c9b1d2a014b5b4
3
+ metadata.gz: 454663cdfd106166fbad7c8d73a8bd664adc9fc2d655ccacdcf8902a9e59b49f
4
+ data.tar.gz: 71708bb68d0391c5cd9deb885064de42977a5ff2f7e3905e7ba007ffc1a2a513
5
5
  SHA512:
6
- metadata.gz: 6870a4c16053fbb9749d22731e46068e7eb22add88e0c9affa4af5d3c35666c3516b5b7495db1d05d6514b3a0b6963e32309bceee8285769840bcd3902a9fd6f
7
- data.tar.gz: b7ccdcbb572e3d73b5893a572832a08d16ca63d2663e4a34f60d7c115917cdad36c8add6f66ea79ea354737e01008dea05e65d88e0497f60f08ac528c4ebb44f
6
+ metadata.gz: 82f013d613567f7f00263b2698825e214ae1c81c5d0caa100b89fe505be8f45bf6ae71fa8c6f7e57afbb806d50ec0fc5382299cd8c6c37b42de403723924b436
7
+ data.tar.gz: 131a4e4a1d166a028812e327b8163be8fb98759ba7ac241709252a4e061fdd5fc1b46950c14ec898484f8785f8c74108159a8cc629788c8235342d95cb90039e
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
8
8
  # Pin for `rake compile` and the platform-gem builds. Keep in lockstep
9
9
  # with .github/workflows/build.yml (which calls `rake compile`) and the
10
10
  # CHANGELOG when libleptris releases.
11
- LIBLEPTRIS_VERSION = "1.9.422"
11
+ LIBLEPTRIS_VERSION = "1.9.424"
12
12
  # Vendored alongside libleptris for fn:normalize-unicode (TODO
13
13
  # .restructure/20): built per platform with a RELOCATABLE @rpath
14
14
  # install name, loaded by ffi.rb before libleptris so the
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.422.0"
4
+ VERSION = "1.9.424.0"
5
5
  end
data/vendor-src/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Sources vendored in this gem (recompile rights; the ruby
2
2
  variant builds them at install via extconf.rb):
3
3
 
4
- - libleptris v1.9.422
4
+ - libleptris v1.9.424
5
5
  - utf8proc v2.11.0
6
6
 
7
7
  Rebuild by hand:
@@ -1,5 +1,23 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.9.424] - 2026-11-15
4
+
5
+ ### Performance
6
+
7
+ - **direct-parse: the attribute face keeps its own frame** (leptris#2032, two levers). The CI-gated attrparse row moved on every platform: **macos −26% to a 0.96× win over pugixml, ubuntu-x86 −20% to 0.98×, ubuntu-arm −9% (1.20× → 1.09×)**. Lever 1 (#2041): `dp_add_attr_inline`'s 10-argument form overflowed arm64's 8-register window — `name_colon` plus a flags word spilled to the caller's frame; packing `len|hash<<32` and the two scan flags into scalars keeps every argument in a register. Lever 2 (#2046): LTO folded `dp_parse_attrs` into `direct_parse_internal`'s mega-frame, where gcc-13's arm64 register allocator spilled the loop's state (~7KB frame, the on-runner profile's dominant samples); `LEPTRIS_NOINLINE` keeps it in its own frame — the file's own `dp_parse_doctype` pattern. Both levers behavior-neutral; the full suite and the three-leg CI bench gates decided each.
8
+
9
+ ### Tooling
10
+
11
+ - **perf-record harness on the CI arm runner** (branch `repro/2032-perf`): `perf record` + report + annotate artifacts under `perf_event_paranoid=1` with the generic linux-tools binary — the on-runner profile that localized both levers.
12
+
13
+
14
+ ## [1.9.423] - 2026-11-15
15
+
16
+ ### Fixed
17
+
18
+ - **simd: the AVX2 canary compiles on MinGW** — the #2039 canary (1.9.422) used POSIX `sigsetjmp`/`siglongjmp` unconditionally; MinGW's GCC provides neither, and every mingw build of the engine (the leptris-py native-ops probe, mingw Ruby builds) failed with `unknown type name 'sigjmp_buf'`. The canary block and its call site are now gated on POSIX (`!_WIN32`); MinGW keeps the CPUID-only verdict — its targets run real AVX2 hardware or the MSVC baseline, not the Rosetta/QEMU emulation the canary guards against. All other platforms unchanged: the canary still fires under Rosetta (re-verified on the failing platform after the regate).
19
+
20
+
3
21
  ## [1.9.422] - 2026-11-15
4
22
 
5
23
  ### Fixed
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(leptris
6
- VERSION 1.9.422
6
+ VERSION 1.9.424
7
7
  DESCRIPTION "Fast XML parser and XPath evaluator in pure C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -21,7 +21,11 @@
21
21
  # include <intrin.h>
22
22
  #endif
23
23
 
24
- #if defined(LEPTRIS_X86_GCC_BUILTINS)
24
+ /* POSIX-only: MinGW's GCC defines the builtins but has no
25
+ * sigsetjmp/siglongjmp — the mingw py-probe build died here
26
+ * (leptris-py ride/422 CI). MinGW keeps the CPUID-only verdict. */
27
+ #if defined(LEPTRIS_X86_GCC_BUILTINS) && !defined(_WIN32)
28
+ # define LEPTRIS_CANARY_POSIX 1
25
29
  # include <setjmp.h>
26
30
  # include <signal.h>
27
31
 
@@ -64,7 +68,11 @@ leptris_cpu_level leptris_cpu_detect(void) {
64
68
  return LEPTRIS_CPU_NEON;
65
69
  #elif defined(LEPTRIS_X86_GCC_BUILTINS)
66
70
  __builtin_cpu_init();
71
+ #if defined(LEPTRIS_CANARY_POSIX)
67
72
  if (__builtin_cpu_supports("avx2") && leptris_avx2_executable()) {
73
+ #else
74
+ if (__builtin_cpu_supports("avx2")) {
75
+ #endif
68
76
  return LEPTRIS_CPU_AVX2;
69
77
  }
70
78
  if (__builtin_cpu_supports("sse4.2")) return LEPTRIS_CPU_SSE42;
@@ -1077,7 +1077,15 @@ static int dp_raw_attr(DParser* p, LeptrisElement elem,
1077
1077
  static struct leptris_ns_cache* dp_ensure_cache(DParser* p,
1078
1078
  LeptrisElement elem);
1079
1079
 
1080
- static int dp_parse_attrs(DParser* p, LeptrisElement elem) {
1080
+ /* Deliberately noinline (the dp_parse_doctype pattern): under LTO
1081
+ * gcc-13 folded this into direct_parse_internal's mega-frame, and the
1082
+ * arm64 register allocator spilled the attr loop's state into a ~7KB
1083
+ * stack frame (the #2032 on-runner profile: ~13% of the attr face's
1084
+ * samples in prologue spill traffic). Own frame = own allocation —
1085
+ * the hot fields stay in registers; the call cost is one frame per
1086
+ * TAG, not per attribute. */
1087
+ static LEPTRIS_NOINLINE int dp_parse_attrs(DParser* p,
1088
+ LeptrisElement elem) {
1081
1089
  /* Reset the per-element caches so dp_add_attr_inline and the
1082
1090
  * xmlns wiring below can both run in O(1) per attr. */
1083
1091
  p->current_elem_last_attr = NULL;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
3
3
  "name": "leptris",
4
- "version": "1.9.422",
4
+ "version": "1.9.424",
5
5
  "description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
6
6
  "homepage": "https://github.com/leptris/leptris",
7
7
  "license": "MIT",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.422.0
4
+ version: 1.9.424.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-15 00:00:00.000000000 Z
11
+ date: 2026-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi