<div dir="ltr">Hi!<div><br></div><div>If ID grows monotinically and you have no plans of recovering after packet reordering, then you can just keep the previous ID.</div><div> - If CurID > PrevID, CurID is unique;</div><div> - If CurID == PrevID, it is not unique;</div><div> - If CurID < PrevID, it is a bug or reordering, let it crash.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 3:01 PM, Alexander Petrovsky <span dir="ltr"><<a href="mailto:askjuise@gmail.com" target="_blank">askjuise@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi!<div><br></div><div>I have the stream of packets with ID (int), and I need to check is the packet is uniq (by ID) or not?<div><br></div><div>Incoming rate is about 20k pps and ID is monotonically grows. What's the best way and data structure fit for this problem?</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: +7 914 8 820 815<div><br></div></div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><font face="'courier new', monospace">Danil Zagoskin | <a href="mailto:z@gosk.in" target="_blank">z@gosk.in</a></font></div></div></div>
</div>