mana-ethereum / ex_rlp

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

remove compilation warnings #18

Closed ayrat555 closed 6 years ago

ayrat555 commented 6 years ago

Remaining warnings:

ERL_COMPILER_OPTIONS=bin_opt_info mix compile

warning: NOT OPTIMIZED: called function decode_long_binary/3 does not begin with a suitable binary matching instruction
  lib/ex_rlp/decode.ex:26

warning: NOT OPTIMIZED: sub binary is used or returned
  lib/ex_rlp/decode.ex:114

warning: NOT OPTIMIZED: sub binary is used or returned
  lib/ex_rlp/decode.ex:123

The first warning cannot be fixed because we can not match on dynamic size parameter. The second and third warnings cannot be fixed because these functions are not called recursively and the compiler can not know how to optimize that.