Inversed-Tech / eyelid

Private iris matching
Apache License 2.0
0 stars 0 forks source link

Allow coefficients that are slices or arrays, rather than vectors #51

Open teor2345 opened 3 months ago

teor2345 commented 3 months ago
          I notice that this currently allocates new coefficient vectors for each of the polynomial parts -- in an ideal world, `al`, `ar`, `bl`, and `br` would be immutable slices and new memory would only be allocated for the `al + ar` and `bl + br` terms, computed below as `alpar` and `blpbr`, using only half of the memory.

This might be nontrivial to implement since Ark polynomials own their coefficients, but it seems possible that passing to coefficient vectors and slices might be worthwhile for a self-contained functionality like this.

Probably goes in the "performance optimizations" stack, however.

_Originally posted by @bgillesp in https://github.com/Inversed-Tech/eyelid/pull/32#discussion_r1568202709_