<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    Your patch has been to review, <br>
    "
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue',
      Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 18px; orphans: 2; text-align: -webkit-auto;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
      -webkit-text-stroke-width: 0px; background-color: rgb(249, 249,
      249); display: inline !important; float: none; ">The idea seems
      good but the list is broken apart and rebuilt. It should look
      like: r2f(List) -> {FF,RR} = lists:split(length(List) div 2 +
      1, List), {FF,lists:reverse(RR, [])}."</span><br>
    <br>
    Could you fix this?<br>
    <br>
    BR Fredrik Gustafsson<br>
    Erlang OTP Team<br>
    On 01/15/2013 05:09 PM, Alex Erofeev wrote:
    <blockquote
cite="mid:CAGNsj_DVCWCG-zWx=2us6ifME8UXQFiqBrfHFuBq70aRw7ggkw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>When applying out/out_r methods if one list of queue
                is empty can happen situation where big list will be
                copying each time, so instead on amortized linear time
                we'll get O(N^2). Example: <a moz-do-not-send="true"
                  href="https://gist.github.com/4539653">https://gist.github.com/4539653</a>
                . Try running it with 100000, 1000000 and 10000000
                elements and compare run times.<br>
              </div>
              So I changed internal functions r2f and f2r to copy each
              time only half of list instead of almost all of it.<br>
              <br>
            </div>
            git fetch <a moz-do-not-send="true"
              href="https://github.com/AlexErofeev/otp/tree/faster_queue">https://github.com/AlexErofeev/otp/tree/faster_queue</a><br>
            <a moz-do-not-send="true"
              href="https://github.com/AlexErofeev/otp/compare/faster_queue">https://github.com/AlexErofeev/otp/compare/faster_queue</a><br>
            <a moz-do-not-send="true"
              href="https://github.com/AlexErofeev/otp/compare/faster_queue.patch">https://github.com/AlexErofeev/otp/compare/faster_queue.patch</a><br>
            <br>
          </div>
          Regards,<br>
          <br>
        </div>
        Alex Erofeev<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
erlang-patches mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-patches@erlang.org">erlang-patches@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-patches">http://erlang.org/mailman/listinfo/erlang-patches</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>