leptris 1.9.412.4-aarch64-linux → 1.9.413.0-aarch64-linux
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 +4 -4
- data/Rakefile +16 -4
- data/lib/leptris/version.rb +1 -1
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +11 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/TODO.max-perf/15-c-face-vs-pugixml.md +12 -0
- data/vendor-src/libleptris/src/leptris/flat/direct_parse.c +23 -11
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e60857aa5e368bfc42a65dc3674052fe7e339c997f0b7bc09ce6b42df569a2c2
|
|
4
|
+
data.tar.gz: 9b76e1513c3d6a05f04d90f913daf1d31eb38af8949db26f956d54514be02c62
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df70ad3f5ed4d100d7723f3ce61fccfed9272cea0e3f5d4cf9e58f84411961d3a2d28813ccc818aff33fb833cced81edc50da53bf04ff63d9a9e46d0253c2ed8
|
|
7
|
+
data.tar.gz: b2e3db8c95fbe295ed7a04dd3ad6d2b92b77f8cbe2565a2df9c6ef6223cc3d477a2017fe658779462dc3199fe54ad85ffdaf99e31feccb2b17dcaa61bb73495a
|
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.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.413"
|
|
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
|
|
@@ -107,9 +107,21 @@ task :compile do
|
|
|
107
107
|
u8_prefix = File.join(u8_dir, "prefix")
|
|
108
108
|
rm_rf(u8_dir)
|
|
109
109
|
mkdir_p(u8_dir)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
# The releases/download asset URL is a CDN edge path — a stale 504
|
|
111
|
+
# there poisons EVERY CI lane at once (2026-11-08: all 19 lanes died
|
|
112
|
+
# on it while the rest of GitHub stayed healthy). The codeload
|
|
113
|
+
# archive of the same tag serves identical bytes from a different
|
|
114
|
+
# path: try the asset first, fall back when it exhausts its retries.
|
|
115
|
+
begin
|
|
116
|
+
fetch_tarball.call(
|
|
117
|
+
"https://github.com/JuliaStrings/utf8proc/releases/download/v#{UTF8PROC_VERSION}/utf8proc-#{UTF8PROC_VERSION}.tar.gz",
|
|
118
|
+
u8_dir)
|
|
119
|
+
rescue StandardError
|
|
120
|
+
warn "releases/download URL failed — falling back to codeload"
|
|
121
|
+
fetch_tarball.call(
|
|
122
|
+
"https://codeload.github.com/JuliaStrings/utf8proc/tar.gz/refs/tags/v#{UTF8PROC_VERSION}",
|
|
123
|
+
u8_dir)
|
|
124
|
+
end
|
|
113
125
|
sh "cmake -B #{u8_dir}/build -S #{u8_dir} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DUTF8PROC_ENABLE_TESTING=OFF"
|
|
114
126
|
sh "cmake --build #{u8_dir}/build --config Release -j 4"
|
|
115
127
|
sh "cmake --install #{u8_dir}/build --prefix #{u8_prefix}"
|
data/lib/leptris/version.rb
CHANGED
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.413] - 2026-11-08
|
|
4
|
+
## Performance
|
|
5
|
+
|
|
6
|
+
- **parse: the loop-invariant parser fields hoisted to const locals** (#1842 A4 slice 1). The main parse loop read `line_offsets_ok` / `drop_ws_text` / `keep_entity_refs` / `recover` from the parser struct per node — all written once before the loop, but un-hoistable by the compiler across the parser-pointer-taking callees, so every node paid memory loads. ABBA x6 on the parse-only scoreboard shape: **+3.5% median parse, 9/9 pairs positive**. Suite 2250/2250.
|
|
7
|
+
|
|
8
|
+
## Documentation
|
|
9
|
+
|
|
10
|
+
- A4 function-level inventory: the tokenizer's remaining arc precisely scoped (dispatch own body ~39%, text scan already 25% SIMD, wiring near-optimal) — the roadmap for the next parse slices.
|
|
11
|
+
|
|
12
|
+
## [1.9.412] - 2026-11-07
|
|
13
|
+
|
|
3
14
|
## Changed
|
|
4
15
|
|
|
5
16
|
- **XPath: `//a | //b` fuses to one doc-ordered pass** (#1842 Track C lever 2). The scoreboard's first XPath query shape (serialbench-c bench.c:104) compiled to two fused descendant walks plus the generic union operator — per-eval concatenation then an O(n log n) doc-order sort. Both bare plain-name descendant branches now compile to one `XPATH_BC_ABSOLUTE_UNION_NAMES` opcode: one combined pre-order walk when the element index is not yet built, an O(n+m) two-pointer merge over the parse-offset keys once it is, and a single bucket copy for same-name unions. Wildcards, prefixed names, predicates, and deep branches stay on the generic path. Measured (ABBA x6, fresh RelWithDebInfo+LTO builds, serialbench medium.xml): union-only shape +8.5%, full scoreboard row (parse + 3 canonical queries) **888 → 945 ops/s (+6.4%)**, all pairs positive. Seven new `XPathUnionFusion` pins, including the interleaved-layout document-order trap a branch-concatenation would get wrong.
|
|
@@ -110,6 +110,18 @@ whole tree to assign ranks (#485 table).
|
|
|
110
110
|
LTO behavior on gcc-win vs clang-mac?) and port whatever
|
|
111
111
|
wins back to the other legs.
|
|
112
112
|
|
|
113
|
+
**A4 INVENTORY COMPLETE (2026-11-07, non-LTO function-level
|
|
114
|
+
profile, parse-only scoreboard shape)**: tokenizer own body
|
|
115
|
+
~39% (the arc itself — char dispatch + element-open/close),
|
|
116
|
+
NEON text scan ~25% (already SIMD; residual = loop overhead
|
|
117
|
+
+ scalar tails), dp_wire_child ~15% (branchless, memory-bound
|
|
118
|
+
— near-optimal), dp_text_create 6.3% (carved, lean), pos
|
|
119
|
+
journal 2.8%. Named sub-levers in the element-open region:
|
|
120
|
+
dp_parse_attrs call site (~1300), the source-position gate +
|
|
121
|
+
record (~600), the close-tag scan (dp_scan_name NOT fused —
|
|
122
|
+
a bounded fusion lever ~300). Evidence: #1842 comment
|
|
123
|
+
(function-level table).
|
|
124
|
+
|
|
113
125
|
## Laws
|
|
114
126
|
|
|
115
127
|
- CI benchmark legs (quiet runners) gate every number; local A/B
|
|
@@ -1743,6 +1743,18 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
1743
1743
|
p.pos += 3;
|
|
1744
1744
|
}
|
|
1745
1745
|
|
|
1746
|
+
/* #1842 A4 slice: the loop-invariant DParser fields hoisted to
|
|
1747
|
+
* const locals — written once above, never inside the loop, but
|
|
1748
|
+
* every per-node read pays a memory load because the compiler
|
|
1749
|
+
* cannot prove the DParser*-taking callees (dp_parse_attrs and
|
|
1750
|
+
* friends) never store through p. The A4 parse profile's
|
|
1751
|
+
* dispatch stubs carry those loads. */
|
|
1752
|
+
const int ho_line_offsets_ok = p.line_offsets_ok;
|
|
1753
|
+
const int ho_drop_ws_text = p.drop_ws_text;
|
|
1754
|
+
const int ho_keep_entity_refs = p.keep_entity_refs;
|
|
1755
|
+
const int ho_recover = p.recover;
|
|
1756
|
+
#define P_LINE_OFFSETS_OK line_offsets_ok
|
|
1757
|
+
(void)ho_drop_ws_text; (void)ho_keep_entity_refs; (void)ho_recover;
|
|
1746
1758
|
while (p.pos < p.end) {
|
|
1747
1759
|
/* Top-level whitespace: a TEXT child of the document node —
|
|
1748
1760
|
* chained like prolog comments/PIs so /node() counts it and
|
|
@@ -1776,7 +1788,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
1776
1788
|
* dropped only when every byte up to the next markup
|
|
1777
1789
|
* delimiter is whitespace; otherwise the text path sees
|
|
1778
1790
|
* the leading whitespace untouched. */
|
|
1779
|
-
if (
|
|
1791
|
+
if (ho_drop_ws_text &&
|
|
1780
1792
|
(*p.pos == ' ' || *p.pos == '\t' || *p.pos == '\n' ||
|
|
1781
1793
|
*p.pos == '\r')) {
|
|
1782
1794
|
char* q = p.pos + 1;
|
|
@@ -1798,7 +1810,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
1798
1810
|
* [text_start, lt) only. */
|
|
1799
1811
|
char* text_start = p.pos;
|
|
1800
1812
|
uint32_t text_off =
|
|
1801
|
-
|
|
1813
|
+
ho_line_offsets_ok
|
|
1802
1814
|
? (uint32_t)(text_start - p.buf) + 1u : 0u;
|
|
1803
1815
|
char* lt = NULL;
|
|
1804
1816
|
int has_amp = 0;
|
|
@@ -1847,7 +1859,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
1847
1859
|
|
|
1848
1860
|
if (tlen == 0) continue;
|
|
1849
1861
|
/* (ws handling lives at the text-branch ENTRY — see the
|
|
1850
|
-
*
|
|
1862
|
+
* ho_drop_ws_text fast path before text_start.) */
|
|
1851
1863
|
if (p.depth == 0) {
|
|
1852
1864
|
/* Whitespace-only between root and PIs. */
|
|
1853
1865
|
for (char* c = text_start; c < p.pos; c++) {
|
|
@@ -1866,7 +1878,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
1866
1878
|
* character references still expand lazily on read);
|
|
1867
1879
|
* named references become ENTITY_REF nodes. A '&' that
|
|
1868
1880
|
* is not a well-formed reference stays literal text. */
|
|
1869
|
-
if (
|
|
1881
|
+
if (ho_keep_entity_refs && has_amp) {
|
|
1870
1882
|
const char* seg = text_start;
|
|
1871
1883
|
const char* tq = text_start;
|
|
1872
1884
|
const char* t_end = text_start + tlen;
|
|
@@ -2011,7 +2023,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2011
2023
|
if (IS_NAME_START(next)) {
|
|
2012
2024
|
/* Element. Snapshot line BEFORE scanning the open tag so
|
|
2013
2025
|
* the element reports the line where '<' appeared. */
|
|
2014
|
-
uint32_t elem_off =
|
|
2026
|
+
uint32_t elem_off = ho_line_offsets_ok
|
|
2015
2027
|
? (uint32_t)(p.pos - p.buf) + 1u : 0u;
|
|
2016
2028
|
LeptrisElement elem;
|
|
2017
2029
|
if (elem_idx < est_elems) {
|
|
@@ -2065,7 +2077,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2065
2077
|
/* Parse attributes (scans from the delimiter position). */
|
|
2066
2078
|
int self_closing = dp_parse_attrs(&p, elem);
|
|
2067
2079
|
if (self_closing < 0) goto fail;
|
|
2068
|
-
if (
|
|
2080
|
+
if (ho_line_offsets_ok &&
|
|
2069
2081
|
!(p.skip_flags & LEPTRIS_PARSE_SKIP_SOURCE_POSITIONS)) {
|
|
2070
2082
|
uint32_t ste = (uint32_t)(p.pos - p.buf);
|
|
2071
2083
|
p.pos_slot_stack[p.depth] = leptris_elem_pos_record(
|
|
@@ -2248,7 +2260,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2248
2260
|
"Element %s closed implicitly by </%.*s>",
|
|
2249
2261
|
elem_name(ce),
|
|
2250
2262
|
(int)close_local_len, close_local);
|
|
2251
|
-
if (
|
|
2263
|
+
if (ho_line_offsets_ok) {
|
|
2252
2264
|
leptris_elem_pos_close_at(
|
|
2253
2265
|
p.doc,
|
|
2254
2266
|
p.pos_slot_stack[p.depth - 1],
|
|
@@ -2270,7 +2282,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2270
2282
|
}
|
|
2271
2283
|
}
|
|
2272
2284
|
close_matched:
|
|
2273
|
-
if (
|
|
2285
|
+
if (ho_line_offsets_ok) {
|
|
2274
2286
|
/* Round 10: fill the open element's journal slot in
|
|
2275
2287
|
* place — no hash probe, and the recorded start offset
|
|
2276
2288
|
* survives verbatim. open_stack[p.depth-1] is `open`;
|
|
@@ -2288,7 +2300,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2288
2300
|
}
|
|
2289
2301
|
else if (next == '!') {
|
|
2290
2302
|
/* Comment, CDATA, or DOCTYPE. */
|
|
2291
|
-
uint32_t markup_off =
|
|
2303
|
+
uint32_t markup_off = ho_line_offsets_ok
|
|
2292
2304
|
? (uint32_t)(p.pos - p.buf) + 1u : 0u;
|
|
2293
2305
|
if (p.end - p.pos >= 4 && p.pos[2] == '-' && p.pos[3] == '-') {
|
|
2294
2306
|
/* Comment: <!-- ... --> */
|
|
@@ -2378,7 +2390,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2378
2390
|
}
|
|
2379
2391
|
else if (next == '?') {
|
|
2380
2392
|
/* PI: <?target data?> or XML declaration. */
|
|
2381
|
-
uint32_t pi_off =
|
|
2393
|
+
uint32_t pi_off = ho_line_offsets_ok
|
|
2382
2394
|
? (uint32_t)(p.pos - p.buf) + 1u : 0u;
|
|
2383
2395
|
p.pos += 2;
|
|
2384
2396
|
char* target_start = p.pos;
|
|
@@ -2493,7 +2505,7 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2493
2505
|
LEPTRIS_DIAG_UNCLOSED_ELEMENT, NULL,
|
|
2494
2506
|
"Element %s still open at end of document",
|
|
2495
2507
|
elem_name(ce));
|
|
2496
|
-
if (
|
|
2508
|
+
if (ho_line_offsets_ok) {
|
|
2497
2509
|
leptris_elem_pos_close_at(
|
|
2498
2510
|
p.doc, p.pos_slot_stack[p.depth - 1],
|
|
2499
2511
|
(uint32_t)(p.pos - p.buf));
|
|
@@ -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.
|
|
4
|
+
"version": "1.9.413",
|
|
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.
|
|
4
|
+
version: 1.9.413.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|