solidstate-network/solidstate-solidity

Add `PackedDoublyLinkedList`

ItsNickBarry opened this issue · 1 comments

For some use cases, the doubly linked list (#170) can be optimized by including both prev and next links in the same mapping. This structure can accommodate data sizes of up to bytes16/uint128. It cannot accommodate address.

Maybe the following would be a simpler change:

  1. use Bytes32List internally for AddressList and Uint256List, and remove the private list functions
  2. add a Bytes16List to the same library and use it internally for a Uint128List