This argument is compelling.  Arthur, can we strike the words "after sorting it" and "leaving it sorted" from the "Finding the median" section of SRFI 132, or do you think that's too big a change?  It's basically saying that we no longer guarantee a specific side effect of the vector-find-median! function.  Here's a proposed paragraph for the Status section:

<p><b>Post-finalization note 1</b>:  It is recommended that implementers use an O(<i>n</i>) rather than an O(<i>n</i> log <i>n</i>) implementation of <code>vector-find-median!</code>.  This improves performance, but removes the guarantee that the vector passed to this procedure is returned in a sorted state.  Instead, it is returned with the elements in arbitrary order.</p>



On Mon, Aug 27, 2018 at 3:35 PM Shiro Kawai <xxxxxx@gmail.com> wrote:
If merely partly sorted is ok I'd use quickselect.  If the srfi text means fully sorted, that's not an option.  I'd like it to be clarified (by just adding "partly" or "fully").

On Mon, Aug 27, 2018 at 9:12 AM John Cowan <xxxxxx@ccil.org> wrote:
You could use quickselect, which leaves the array partly sorted, I suppose.  I'm inclined to let it stand, though.

On Sat, Aug 19, 2017 at 6:13 AM Shiro Kawai <xxxxxx@gmail.com> wrote:
This is out of curiosity.

The srfi text states vector-find-median! leaves the input vector sorted after operation.  Is there any particular reason that it needs to be fully sorted?

To unsubscribe from this list please go to http://www.simplelists.com/confirm.php?u=iPDyCzVQOm2vDdmNBVjg8lNkj4OTppY3