Skip to content

Instantly share code, notes, and snippets.

@aclamk
Created October 10, 2018 14:28
Show Gist options
  • Save aclamk/74c6056b72ddcc7b622a93b2b5a5983d to your computer and use it in GitHub Desktop.
Save aclamk/74c6056b72ddcc7b622a93b2b5a5983d to your computer and use it in GitHub Desktop.
Two phase encode
Encode when all fields are encoded to bytestream
[ RUN ] BufferList.encode_bench
[ OK ] BufferList.encode_bench (251 ms)
[ RUN ] BufferList.encode_bench_x
[ OK ] BufferList.encode_bench_x (31 ms)
Encode when one of fields is bufferlist and its data is not copied
[ RUN ] BufferList.encode_bench
[ OK ] BufferList.encode_bench (324 ms)
[ RUN ] BufferList.encode_bench_x
[ OK ] BufferList.encode_bench_x (162 ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment