[Lldb-commits] [lldb] r106192 - /lldb/trunk/source/Symbol/Symtab.cpp

Chris Lattner clattner at apple.com
Wed Jun 16 18:07:13 PDT 2010


Thanks!

On Jun 16, 2010, at 5:51 PM, Owen Anderson wrote:

> Author: resistor
> Date: Wed Jun 16 19:51:12 2010
> New Revision: 106192
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=106192&view=rev
> Log:
> Fix comment, per Chris' suggestion.
> 
> Modified:
>    lldb/trunk/source/Symbol/Symtab.cpp
> 
> Modified: lldb/trunk/source/Symbol/Symtab.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=106192&r1=106191&r2=106192&view=diff
> ==============================================================================
> --- lldb/trunk/source/Symbol/Symtab.cpp (original)
> +++ lldb/trunk/source/Symbol/Symtab.cpp Wed Jun 16 19:51:12 2010
> @@ -254,7 +254,10 @@
>     if (indexes.size() <= 1)
>         return;
> 
> -    // Sort the indexes in place using std::sort
> +    // Sort the indexes in place using std::stable_sort.
> +    // NOTE: The use of std::stable_sort instead of std::sort here is strictly for performance,
> +    // not correctness.  The indexes vector tends to be "close" to sorted, which the
> +    // stable sort handles better.
>     std::stable_sort(indexes.begin(), indexes.end(), SymbolIndexComparator(m_symbols));
> 
>     // Remove any duplicates if requested
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits





More information about the lldb-commits mailing list