mana-ethereum / ex_rlp

Elixir implementation of Ethereum's RLP (Recursive Length Prefix) encoding
MIT License
31 stars 9 forks source link

Improve Performance by Prefixing List and TCO, Bump to 0.4.0 #15

Closed hayesgm closed 6 years ago

hayesgm commented 6 years ago

This patch improves performance of ExRLP by doing a better job at prepending to lists (a constant time operation) and making sure that calls can be tail-call optimized. To test the performance, we add a large decoding test that goes from 300 seconds to 7 seconds locally on a large decode. This fixes an issue with Warp that made it impossible to process large state packets.