dekarrin / rezi

REZI - Rarefied Encoding (Compressible) for Interchange
MIT License
0 stars 0 forks source link

Re-use element reflect info #70

Closed dekarrin closed 9 months ago

dekarrin commented 9 months ago

Currently, any time encoding is recursed into (such as when encoding map keys and values), typeinfo analysis is re-run. There should be an unexported internal-use dec and enc function that Dec and Enc call into but allow giving the typeInfo so reflect doesn't need to be called again since it already was initially. When this issue is resolved, all internal calls to Dec and Enc should be replaced with internal-use ones wherever the typeInfo for the encoded/decoded element is already known.