You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Drop decompose_json / decompose_schema from the Rust crate (breaking).
- Drop them from bench harness and refresh the side-by-side numbers.
- Bench compares against synalinks _py_<op> reference implementations.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+16-20Lines changed: 16 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ callers do not need to know there is Rust underneath.
11
11
12
12
Parity with the Python reference is asserted on every op and payload size
13
13
(see `bench/test_parity.py`). Headline speedups on realistic payloads:
14
-
**~470× on `factorize_schema`**, **~290× on `factorize_json`** at 600 keys,
14
+
**~485× on `factorize_schema`**, **~280× on `factorize_json`** at 600 keys,
15
15
4–8× on masking ops, 2–4× on simple key rewrites. Full table below.
16
16
17
17
## Build
@@ -34,8 +34,7 @@ import synaops
34
34
|`prefix_json`|`(json, prefix)`| Prepend `prefix_` to every top-level key. |
35
35
|`suffix_json`|`(json, suffix)`| Append `_suffix` to every top-level key. |
36
36
|`concatenate_json`|`(json1, json2)`| Merge two objects; on key collision append `_1`, `_2`, … to disambiguate. |
37
-
|`factorize_json`|`(json)`| Group keys sharing a singular base into a single array under the plural key. Inverse of `decompose_json`. |
38
-
|`decompose_json`|`(json)`| Expand plural-keyed array properties into individual singular-keyed properties with numerical suffixes. Inverse of `factorize_json`. |
37
+
|`factorize_json`|`(json)`| Group keys sharing a singular base into a single array under the plural key. |
39
38
|`out_mask_json`|`(json, mask=None, pattern=None, recursive=True)`| Drop keys whose base name is in `mask` or whose base name matches the regex `pattern`. Numerical suffixes are ignored when matching. |
40
39
|`in_mask_json`|`(json, mask=None, pattern=None, recursive=True)`| Keep only the keys whose base name is in `mask` or matches `pattern`. In recursive mode, arrays are preserved and their object items are filtered in place. |
|`suffix_schema`|`(schema, suffix)`| Append `_suffix` to every property key and update `title` / `required` accordingly. |
50
49
|`concatenate_schema`|`(schema1, schema2)`| Merge two schemas (properties, `required`, `$defs`); on key collision append numeric suffixes and regenerate titles. |
51
50
|`factorize_schema`|`(schema)`| Group similar singular-keyed properties into array-typed plural-keyed properties; folds heterogeneous `items` into `anyOf`. |
52
-
|`decompose_schema`|`(schema)`| Expand plural-keyed array properties into a single singular-keyed property carrying the `items` schema. |
53
51
|`out_mask_schema`|`(schema, mask=None, pattern=None, recursive=True)`| Remove properties whose base name is in `mask` or matches `pattern`. With `recursive=True`, descends into nested object/array properties and `$defs`, then prunes `$defs` entries no longer referenced. |
54
52
|`in_mask_schema`|`(schema, mask=None, pattern=None, recursive=True)`| Keep only properties whose base name is in `mask` or matches `pattern`. Same recursive/`$defs`-pruning behavior as `out_mask_schema`. |
55
53
|`standardize_schema`|`(schema)`| Placeholder for schema normalization (currently identity). |
0 commit comments