<div dir="auto">I will enjoy learning more about optimization in Haskell from this repo. Thanks for writing (it and your email)!<div dir="auto"><br></div><div dir="auto">Ryan Reich</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 19, 2019, 14:58 Станислав Черничкин <<a href="mailto:schernichkin@gmail.com">schernichkin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">I was investigating Haskell’s binary serialization libraries and has found that lot of them (binary, cereal and </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">protocol-buffers</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">) has pretty similar design. They capable to consume lazy </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">bytestrings</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> and </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">either </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">produce result, report error or produce partial result, indicating that more input data required. Such design leads to </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">quite complex readers, and often ends up with producing closures in runtime. If you take a close look at binary’s </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">microbenches</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> (</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">binary</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> in general bit faster than cereal, so I focused on binary) you will discover, that it triggers GC </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">even </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">during simple tasks, such as reading a bunch of Word64 and summing results. And it relatively slow. Binary’s performance limited to hundreds of megabytes per second even in simple scenarios, but actual memory bandwidth should allow us process gigabytes per second. So, I decided to try a different approach. </span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">My approach is based on two assumptions so if it does not suit your case it </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-FindHit m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:rgb(255,238,128)">obliviously</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">will not work for you. </span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">First – when dealing with binary data we always know exactly how many bytes we want to read. This happens because we either read a fixed size primitive type or length-prefixed variable size data (possibly not “prefixed”, but you always know expected message length from somewhere).</span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">Second – </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">chunks of data are continuous. I.e. we working with strict </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">bytestrings</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> more often. Even when you processing chunked stream of data with unknown number of messages (such as </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">Mesos </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">RecordIO</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> Format</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">) you should always be able to allocate </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">continuous</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> memory buffer for a single entity you want to deserialize.</span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">If it’s ok for you lets go on. First thing I’ve created was so called static reader. Static – because reader knows how mush bytes it wants to consume at compile time. Such readers suitable for reading combinations of primitive values. Here the implementation </span></span><a class="m_3110699625770171121gmail-Hyperlink m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" href="https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/src/Lev/Reader/Static.hs" rel="noreferrer noreferrer" style="margin:0px;padding:0px;text-decoration-line:none;color:inherit" target="_blank"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-Underlined m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(5,99,193);text-decoration-line:underline;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/src/Lev/Reader/Static.hs</span></span></a><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> Static reader is somewhat monadic (you can use do-syntax with </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(36,41,46);font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">RebindableSyntax</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(36,41,46);font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> extension like here </span></span><a class="m_3110699625770171121gmail-Hyperlink m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" href="https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/bench/Bench/Lev/Reader/Static.hs" rel="noreferrer noreferrer" style="margin:0px;padding:0px;text-decoration-line:none;color:inherit" target="_blank"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-Underlined m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(5,99,193);text-decoration-line:underline;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/bench/Bench/Lev/Reader/Static.hs</span></span></a><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> ) but it actually indexed monad and it unfortunately incompatible with traditional monads. Off</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">sets</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> and si</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">zes are </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-ContextualSpellingAndGrammarError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">calculates</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> at type level during the compile time and according to </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">microbences</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> s</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">tatic reader</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> does not introduced any overhead compared to hand-written reader using the low-level indexInt64OffAddr# function (</span></span><a class="m_3110699625770171121gmail-Hyperlink m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" href="https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/bench/Bench/Handwritten.hs" rel="noreferrer noreferrer" style="margin:0px;padding:0px;text-decoration-line:none;color:inherit" target="_blank"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-Underlined m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(5,99,193);text-decoration-line:underline;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/bench/Bench/Handwritten.hs</span></span></a><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">)</span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">Next thing was a dynamic reader. D</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">ynamic</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> readers are composed from static readers, they are fully monadic and allow you to read length-prefixed data structures (you read length with wrapped static reader and then perform normal monadic binding to supply a reader which reads a value). Here the implementation </span></span><a class="m_3110699625770171121gmail-Hyperlink m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" href="https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/src/Lev/Reader/Dynamic.hs" rel="noreferrer noreferrer" style="margin:0px;padding:0px;text-decoration-line:none;color:inherit" target="_blank"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-Underlined m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(5,99,193);text-decoration-line:underline;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/src/Lev/Reader/Dynamic.hs</span></span></a><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> </span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">I’ve discovered, that </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">typeclasses</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> are surprisingly fast. So, it’s completely ok to have something like “(Cursor c) => … Reader” where cursor contains functions for </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">overflow checking</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> and memory buffer progression. I was not able to achieve same performance when I passed buffer </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">callbacks</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> explicitly, possibly because of </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">inlining</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> of specialization magic. So, I've created </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">ByteStringCursor</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> ( </span></span><a class="m_3110699625770171121gmail-Hyperlink m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" href="https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/src/Lev/Reader/ByteString.hs" rel="noreferrer noreferrer" style="margin:0px;padding:0px;text-decoration-line:none;color:inherit" target="_blank"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-Underlined m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(5,99,193);text-decoration-line:underline;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">https://github.com/PROTEINE-INSAIDERS/lev-tolstoy/blob/master/src/Lev/Reader/ByteString.hs</span></span></a><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> ) which allows to read strict </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">bytestrings</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">. I suppose that cursors introduce flexibility: you may read </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">strict </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">bytestring</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> or you may define custom cursor for reading custom memory buffers.</span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">Finally, I’ve written some </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">microbenches</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> for my cases and also ported one </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">micro</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">bench</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> from binary. And my implementation was able to run 10x-15x faster than binary on strict </span><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">bytestring</span><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">. Moreover, it does not trigger GC during the run at all! You may find the project and all the </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">bench</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">es here </span></span><a class="m_3110699625770171121gmail-Hyperlink m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" href="https://github.com/PROTEINE-INSAIDERS/lev-tolstoy" rel="noreferrer noreferrer" style="margin:0px;padding:0px;text-decoration-line:none;color:inherit" target="_blank"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-Underlined m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;color:rgb(5,99,193);text-decoration-line:underline;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">https://github.com/PROTEINE-INSAIDERS/lev-tolstoy</span></span></a><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-EmptyTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"></span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div class="m_3110699625770171121gmail-OutlineElement m_3110699625770171121gmail-Ltr m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;overflow:visible;clear:both;direction:ltr;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Web",Arial,Verdana,sans-serif;font-size:12px"><p class="m_3110699625770171121gmail-Paragraph m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="RU-RU" style="margin:0px;padding:0px;vertical-align:baseline;background-color:transparent;color:windowtext"><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">So, what's the purpose of my message? It’s quite unlikely that I’ll release my code on the </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">H</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">ackage</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">. This is because I’m a hobbyist Haskell developer and doing it all in my free time. But before </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-SpellingError m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:0% 100%;background-image:url("");border-bottom:1px solid transparent;background-color:inherit">mr</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">. Putin will close Internet in Russia</span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit"> I’d like to demonstrate that it’s possible to </span></span><span class="m_3110699625770171121gmail-TextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" lang="EN-GB" style="margin:0px;padding:0px;font-size:11pt;font-family:Calibri,Calibri_MSFontService,sans-serif;font-kerning:none;line-height:19.425px;font-variant-ligatures:none"><span class="m_3110699625770171121gmail-NormalTextRun m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;background-color:inherit">write very fast binary deserializer taking in account several assumptions which seems quite reasonably for me. So, feel free to borrow the ideas, or share the ideas, if you know how it could be implemented better. </span></span><span class="m_3110699625770171121gmail-EOP m_3110699625770171121gmail-BCX0 m_3110699625770171121gmail-SCXW213930002" style="margin:0px;padding:0px;font-size:11pt;line-height:19.425px;font-family:Calibri,Calibri_MSFontService,sans-serif"> </span></p></div><div><br></div>-- <br><div dir="ltr" class="m_3110699625770171121gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-family:arial;font-size:small">Sincerely, Stanislav Chernichkin.</span><br></div></div></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>