Use pdqsort.

This commit is contained in:
Bartosz Taudul 2017-12-08 23:11:08 +01:00
parent 2c4eaf162d
commit 0da09bc62b
3 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,7 @@
#include "../common/TracyProtocol.hpp" #include "../common/TracyProtocol.hpp"
#include "../common/TracySystem.hpp" #include "../common/TracySystem.hpp"
#include "../common/TracyQueue.hpp" #include "../common/TracyQueue.hpp"
#include "tracy_pdqsort.h"
#include "TracyFileRead.hpp" #include "TracyFileRead.hpp"
#include "TracyFileWrite.hpp" #include "TracyFileWrite.hpp"
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
@ -3294,7 +3295,7 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
break; break;
} }
} }
std::sort( tmpvec, dst ); pdqsort_branchless( tmpvec, dst );
draw->AddLine( wpos + ImVec2( x1, offset + PlotHeight - ( tmpvec[0] - min ) * revrange * PlotHeight ), wpos + ImVec2( x1, offset + PlotHeight - ( dst[-1] - min ) * revrange * PlotHeight ), 0xFF44DDDD ); draw->AddLine( wpos + ImVec2( x1, offset + PlotHeight - ( tmpvec[0] - min ) * revrange * PlotHeight ), wpos + ImVec2( x1, offset + PlotHeight - ( dst[-1] - min ) * revrange * PlotHeight ), 0xFF44DDDD );

View File

@ -121,6 +121,7 @@
<ClInclude Include="..\..\..\server\TracyView.hpp" /> <ClInclude Include="..\..\..\server\TracyView.hpp" />
<ClInclude Include="..\..\..\server\tracy_benaphore.h" /> <ClInclude Include="..\..\..\server\tracy_benaphore.h" />
<ClInclude Include="..\..\..\server\tracy_flat_hash_map.hpp" /> <ClInclude Include="..\..\..\server\tracy_flat_hash_map.hpp" />
<ClInclude Include="..\..\..\server\tracy_pdqsort.h" />
<ClInclude Include="..\..\..\server\tracy_sema.h" /> <ClInclude Include="..\..\..\server\tracy_sema.h" />
<ClInclude Include="..\..\libs\gl3w\GL\gl3w.h" /> <ClInclude Include="..\..\libs\gl3w\GL\gl3w.h" />
<ClInclude Include="..\..\libs\gl3w\GL\glcorearb.h" /> <ClInclude Include="..\..\libs\gl3w\GL\glcorearb.h" />

View File

@ -155,6 +155,9 @@
<ClInclude Include="..\..\..\common\TracyForceInline.hpp"> <ClInclude Include="..\..\..\common\TracyForceInline.hpp">
<Filter>common</Filter> <Filter>common</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\..\server\tracy_pdqsort.h">
<Filter>server</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Natvis Include="DebugVis.natvis" /> <Natvis Include="DebugVis.natvis" />