<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Brent,<div><br></div><div>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.</div><div><br></div><div>- Mike</div><div><br></div><div><br></div><div><br><div><div>On Mar 13, 2014, at 12:41 PM, Brent Friedman <<a href="mailto:fourthgeek@gmail.com">fourthgeek@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi Mike,<div><br></div><div>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.</div>
<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 10:32 AM, Mike McFadden <span dir="ltr"><<a href="mailto:mike@ivideoapp.com" target="_blank">mike@ivideoapp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>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.</div>
<div><br></div><div><a href="https://github.com/BonzaiThePenguin/WikiSort" target="_blank">https://github.com/BonzaiThePenguin/WikiSort</a></div><div><br></div><div>Is there someone in particular I should speak to about it? It's not exactly a minor change.</div>
<span class="HOEnZb"><font color="#888888"><div><br></div><div>- Mike</div><div><br></div></font></span></div><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></body></html>