The GitHub Actions job "npm_and_yarn in /javascript for minimatch - Update 
#1265379233" on fory.git/main has failed.
Run started by GitHub user dependabot[bot] (triggered by dependabot[bot]).

Head commit for run:
a44f24aceaee3c8a5b834b0658eec499b3db4f1d / Shawn Yang <[email protected]>
feat(python): fast cython struct serializer (#3443)

## Why?

`pyfory` dataclass serialization hot paths is still not fast enough
because slow python methods call cost

## What does this PR do?

- Adds a Cython `DataClassSerializer` implementation
(`python/pyfory/struct.pxi`) and wires it into `serialization.pyx`,
while keeping Python fallback wiring in `struct.py`.
- Expands C++ primitive fastpath helpers to support more primitive type
IDs (signed/unsigned/fixed/var/tagged numerics, float32, bool coercion)
and exposes them for struct field fastpath use.
- Carries per-field ref metadata from `TypeDef` into serializer creation
(`python/pyfory/meta/typedef.py`) and updates struct serializer type
detection in `registry.py` for both Python and Cython serializer
classes.
- Optimizes map type-info lookup in `MapSerializer` with `FlatIntMap`
caches keyed by class pointer.
- Updates Python benchmarks to focus on `struct` and `slots_struct`
cases and improves msgpack dataclass conversion/restore handling for
benchmark parity.
- Refreshes tests in `test_struct.py`, `test_ref_tracking.py`, and
`xlang_test_main.py` for bool coercion, numeric/ref edge cases, schema
evolution defaults, and enum evolution behavior.
- Adds an extra Python CI job that runs with
`ENABLE_FORY_CYTHON_SERIALIZATION=1`.


## Related issues

#1017 
#3441


## Does this PR introduce any user-facing change?

- Improves dataclass serialization behavior/performance in Python Cython
mode and refines schema-evolution defaults for missing required fields.

- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?

## Benchmark
```
================================================================================
SPEEDUP (Fory vs Pickle)
================================================================================
Benchmark                 Fory                 Pickle               Speedup     
        
--------------------------------------------------------------------------------
struct                    2.32 us              4.75 us              2.05x       
        

================================================================================
SPEEDUP (Fory vs Msgpack)
================================================================================
Benchmark                 Fory                 Msgpack              Speedup     
        
--------------------------------------------------------------------------------
struct                    2.32 us              12.27 us             5.28x   
```

Report URL: https://github.com/apache/fory/actions/runs/22585928692

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to