mirror of
https://github.com/valitydev/elixir-thrift.git
synced 2024-11-07 02:35:17 +00:00
819216f830
A pure Elixir implementation of the Thrift binary protocol. This PR includes serialization and deserialization for all thrift types as well as testing to make sure we match the thrift spec (which can be found here: https://erikvanoosten.github.io/thrift-missing-specification/#_binary_encoding) The binary protocol is generated alongside the thrift data types, yielding a much faster implementation than the apache project's canonical one. Our benchmarks (using benchfella) indicate a speedup of between 10 and 20x. ## Binary Protocol Performance benchmark name | iterations | average time ------------------|-----------|--------------- elixir serialization (left as IOList) | 2000 | 849.01 µs/op elixir serialization (iolist_size) | 2000 | 933.83 µs/op elixir serialization (converted to binary) | 1000 | 1281.23 µs/op elixir deserialization | 1000 | 1178.46 µs/op erlang serialization left as IOList | 100 | 10284.84 µs/op erlang serialization (converted to binary) | 100 | 11588.89 µs/op erlang deserialization | 100 | 21433.17 µs/op
9 lines
121 B
JSON
9 lines
121 B
JSON
{
|
|
"skip_files": [
|
|
"ext",
|
|
"src/thrift_lexer.erl",
|
|
"src/thrift_parser.erl",
|
|
"test/support"
|
|
]
|
|
}
|