[cfe-dev] Who should I talk to about a proposed update to stable_sort?
Mike McFadden
mike at ivideoapp.com
Thu Mar 13 10:27:47 PDT 2014
Hi Brent,
Thank you, although it's actually only called once at the start of the function. It performs a bottom-up merge on that power-of-two size. I wasn't sure if libc++ already had a function for that so I just kept the one from the C port.
- Mike
On Mar 13, 2014, at 12:41 PM, Brent Friedman <fourthgeek at gmail.com> wrote:
> Hi Mike,
>
> A quick note: you can implement FloorPowerOfTwo much more easily, and probably faster, using either BitScanReverse or leading zero count instructions. These can be somewhat platform-specific or compiler-dependent but likely will have a noticeable impact.
>
>
>
>
> On Thu, Mar 13, 2014 at 10:32 AM, Mike McFadden <mike at ivideoapp.com> wrote:
> Or, more specifically, inplace_stable_sort, from libcxx. I've been working on a hybrid in-place merge sort for a few weeks, using a paper called "Ratio based in-place stable merging" from 2008, and it resulted in a design that's 3-15x faster than inplace_stable_sort and 80-90% of the speed of stable_sort, while using O(1) memory. I have all of the details up on the project page, including C++ code that directly benchmarks and validates against stable_sort.
>
> https://github.com/BonzaiThePenguin/WikiSort
>
> Is there someone in particular I should speak to about it? It's not exactly a minor change.
>
> - Mike
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140313/f3773166/attachment.html>
More information about the cfe-dev
mailing list