pyteal icon indicating copy to clipboard operation
pyteal copied to clipboard

Improve internal representation of `abi.DynamicArray`

Open jasonpaulos opened this issue 3 years ago • 1 comments

Currently the internal representation of dynamic ABI arrays is the same as its encoded form.

This internal representation can be improved, especially when the element type is static and has length 1. In this situation, it's completely unnecessary to store the 2 byte length prefix that's part of the official encoding.

jasonpaulos avatar Jul 20 '22 22:07 jasonpaulos

Would it be better to do this by introducing a new type like pt.Array for this purpose, since it is, as you say internal not part of the A B "Interface" to the outside world?

jannotti avatar Jul 26 '22 19:07 jannotti