aiogram-nav-native 0.3.2__tar.gz
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.
- aiogram_nav_native-0.3.2/BENCHMARKS.md +45 -0
- aiogram_nav_native-0.3.2/Cargo.lock +817 -0
- aiogram_nav_native-0.3.2/Cargo.toml +30 -0
- aiogram_nav_native-0.3.2/LICENSE +22 -0
- aiogram_nav_native-0.3.2/PKG-INFO +85 -0
- aiogram_nav_native-0.3.2/README.md +71 -0
- aiogram_nav_native-0.3.2/benches/core.rs +32 -0
- aiogram_nav_native-0.3.2/pyproject.toml +24 -0
- aiogram_nav_native-0.3.2/pytest.ini +2 -0
- aiogram_nav_native-0.3.2/python/aiogram_nav_native/__init__.py +31 -0
- aiogram_nav_native-0.3.2/python/aiogram_nav_native/__init__.pyi +70 -0
- aiogram_nav_native-0.3.2/python/aiogram_nav_native/py.typed +0 -0
- aiogram_nav_native-0.3.2/src/canonical.rs +722 -0
- aiogram_nav_native-0.3.2/src/json.rs +140 -0
- aiogram_nav_native-0.3.2/src/lib.rs +416 -0
- aiogram_nav_native-0.3.2/src/python_json.rs +224 -0
- aiogram_nav_native-0.3.2/src/registry.rs +163 -0
- aiogram_nav_native-0.3.2/tests/test_core.py +477 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Native diagnostic measurements
|
|
2
|
+
|
|
3
|
+
These measurements are diagnostics from macOS 15.8.1 x86_64, CPython 3.12.13 and
|
|
4
|
+
Rust 1.97.1 on 11 November 2026. They are not the end-to-end release gate against
|
|
5
|
+
optimized Python. The shared repository benchmark runner owns that comparison.
|
|
6
|
+
|
|
7
|
+
A fixed JSON document containing 20 nodes, integer revisions, nested parameters,
|
|
8
|
+
Armenian text, an emoji, a boolean and negative zero was measured with five
|
|
9
|
+
repetitions of 2,000 calls (`timeit`, median time per call). Python used
|
|
10
|
+
`json.loads(..., object_pairs_hook=duplicate_rejecting_pairs)`:
|
|
11
|
+
|
|
12
|
+
| Diagnostic | Python | Native |
|
|
13
|
+
| --- | ---: | ---: |
|
|
14
|
+
| Strict JSON to Python values | 43.60 µs | 62.85 µs |
|
|
15
|
+
| SHA256 of exact canonical text | 5.78 µs | 9.77 µs |
|
|
16
|
+
|
|
17
|
+
Those boundaries regressed; they do not establish native acceleration. Python's
|
|
18
|
+
existing C implementations and conversion costs matter.
|
|
19
|
+
|
|
20
|
+
A compiled deep-chain registry comparison against the **published 0.2.0** Python
|
|
21
|
+
implementation, excluding Python Node construction and pre-serializing the native
|
|
22
|
+
input, measured:
|
|
23
|
+
|
|
24
|
+
| Nodes | Published Python | Native |
|
|
25
|
+
| --- | ---: | ---: |
|
|
26
|
+
| 50 | 0.312 ms | 0.185 ms |
|
|
27
|
+
| 500 | 31.993 ms | 2.159 ms |
|
|
28
|
+
| 5,000 | 2,947.487 ms | 19.134 ms |
|
|
29
|
+
|
|
30
|
+
This mostly demonstrates the old quadratic graph-validation cost. The optimized
|
|
31
|
+
Python implementation also removes that cost; the table cannot justify a native
|
|
32
|
+
release against it. The actual engine benchmark must include native input
|
|
33
|
+
serialization and Python model construction consistently.
|
|
34
|
+
|
|
35
|
+
Criterion is committed in `benches/core.rs`. A diagnostic run used
|
|
36
|
+
`cargo bench --manifest-path native/Cargo.toml --bench core -- --sample-size 10
|
|
37
|
+
--measurement-time 1 --warm-up-time 1`; the graph-kernel intervals were
|
|
38
|
+
159.95–166.87 µs, 1.8406–1.9370 ms and 20.173–21.453 ms for 50/500/5,000 nodes.
|
|
39
|
+
These are Rust-only kernel measurements with no Python boundary. Short samples,
|
|
40
|
+
shared-machine load and outliers limit their precision. History-trimming cases
|
|
41
|
+
are payload-size stress tests, not high-level retained-receipt workloads.
|
|
42
|
+
|
|
43
|
+
Native publication and a dependency extra remain blocked until the approved
|
|
44
|
+
representative end-to-end gate shows a real benefit without the prohibited p95
|
|
45
|
+
regression. Correctness and ABI parity alone do not satisfy that gate.
|