<div dir="ltr"><div dir="ltr">On Mon, Jun 7, 2021 at 2:38 PM Thomas Depierre <<a href="mailto:depierre.thomas@gmail.com">depierre.thomas@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div dir="ltr"><div>Yes there is a pretty simple answer :) Parsing is far harder than serialization ! for parsing, you have to read a bit of the binary stream, find what type it is, then translate the data to a data type, which means allocating memory. On top of that you need to validate that it is not a mangled binary stream. And you need to do it piecemeal, with a lot of information about current steps. This is far more complex than translating a particular memory setting that you know the size of into a binary stream.<br></div></div></div></blockquote><div><br></div><div>Another thing that comes to mind is that the GC may be interfering with the results as binary_to_term would create more garbage than term_to_binary.</div><div><br></div><div>Lukas</div></div></div>