<p dir="ltr">Go for it you'll never go back ;-)</p>
<p dir="ltr">--<br>
Sent from mobile phone please excuse typos and terseness</p>
<div class="gmail_quote">On Nov 13, 2015 12:00 PM, "Burlen Loring" <<a href="mailto:burlen.loring@gmail.com">burlen.loring@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Will,<br>
    <br>
    Your recent post mentioning changing std::sort to
    vtkSMPTools::Sort() had me thinking about that, and also about
    giving the gift of code. In the algorithm there are 3 distinct
    parts, computing the depths, sorting, and building the output. Each
    of of those could be parallelized. I'm willing to try it. Thanks for
    the suggestion!<br>
    <br>
    Burlen<br>
    <br>
    <div>On 11/12/2015 10:20 AM, Will Schroeder
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Burlen I would use vtkSMPTools::Sort(). Under the hood it
          uses std::sort when VTK is built in
          VTK_SMP_IMPLEMENTATION_TYPE=Sequential mode (default). But
          when built with VTK_SMP_IMPLEMENTATION_TYPE=TBB, etc. you'll
          see significant parallelization benefits.</div>
        <div><br>
          W</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Nov 11, 2015 at 12:04 PM,
          Burlen Loring <span dir="ltr"><<a href="mailto:burlen.loring@gmail.com" target="_blank">burlen.loring@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
            <br>
            Would anyone be willing to review this patch?<br>
            <a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/844" rel="noreferrer" target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/844</a><br>
            <br>
            I was profiling VisIt and noticed that vtkDepthSortPolyData
            (in spite of its limitations it is used by VisIt for
            transparent rendering) made use of qsort and about 1/2 the
            time was spent by qsort. std::sort is known to be faster
            because of the possibility of the compiler to inline the
            comparisons. Updating qsort to std::sort seemed like an easy
            way to make it faster. As I worked the profiler pointed out
            a number of other fairly easy things to improve and overall
            the class is now ~3x faster for two of the modes and ~2x
            faster for the other. I enumerated the changes in the commit
            message and have added a cxx test to improve the test
            coverage.<br>
            <br>
            If you have the time, please take a look, and let me know if
            you have any feedback on it.<br>
            <br>
            Thanks<br>
            Burlen<br>
            <br>
            <br>
            _______________________________________________<br>
            Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
            <br>
            Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank"><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a></a><br>
            <br>
            Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
            <br>
            Follow this link to subscribe/unsubscribe:<br>
            <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div>William J. Schroeder, PhD<br>
          Kitware, Inc.<br>
          28 Corporate Drive<br>
          Clifton Park, NY 12065<br>
          <a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a><br>
          <a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>
          <a href="tel:%28518%29%20881-4902" value="+15188814902" target="_blank">(518) 881-4902</a></div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div>