Problem
Currently a FixedArray will do length check on all of its elements even if the elements are already the correct type.
For example: https://github.com/joe-p/snarkjs-algorand/blob/77e947e51dbbeed69852a5445328e5b0bef43a5f/contracts/out/Groth16Bls12381Verifier.approval.teal#L229-L229
Source: https://github.com/joe-p/snarkjs-algorand/blob/77e947e51dbbeed69852a5445328e5b0bef43a5f/contracts/groth16_bls12381.algo.ts#L187-L187
In this scenario I would expect the FixedArray to essentially be the same as concatting the bytes together, but FixedArray ends up eating more program size and budget
Solution
For now just concatting bytes works
Proposal
Skip size checks when the types are known to be the correct type
Pros & Cons
No response
Dependencies
No response
Problem
Currently a
FixedArraywill do length check on all of its elements even if the elements are already the correct type.For example: https://github.com/joe-p/snarkjs-algorand/blob/77e947e51dbbeed69852a5445328e5b0bef43a5f/contracts/out/Groth16Bls12381Verifier.approval.teal#L229-L229
Source: https://github.com/joe-p/snarkjs-algorand/blob/77e947e51dbbeed69852a5445328e5b0bef43a5f/contracts/groth16_bls12381.algo.ts#L187-L187
In this scenario I would expect the FixedArray to essentially be the same as concatting the bytes together, but FixedArray ends up eating more program size and budget
Solution
For now just concatting bytes works
Proposal
Skip size checks when the types are known to be the correct type
Pros & Cons
No response
Dependencies
No response