You'd have to implement the sorting algorithm by hand, right? You wouldn't 
be able to use the underlying JS engine.

I imagine that that would be a lot slower. Writing in interpreted script 
vs. executable code.

But, computers are getting faster these days. Not mine, mind you. But some 
peoples'.

If you gave it a name like "stable-sort" there would be no confusion, 
except for people who don't check the docs.

What's really needed is for JS to allow developers the ability to specify 
the kind of sort. I think Java may have that level of specificity.

On Saturday, December 7, 2019 at 1:18:06 AM UTC-8, Jed Carty wrote:
>
> I have been thinking about making an explicitly stable sort operator for 
> tiddlywiki so this is easier.
>
> In general unstable sorts can be much faster than stable sorts so by 
> default some (or most?) browsers use unstable sorting algorithms like 
> quicksort.
>
> A stable sort keeps elements that have the same ranking in the sorting in 
> the order they were at the input.
>
> A stable sorting operator would allow you to do this in one filter, the 
> only problem is that it may be slower than the normal sort operator. Unless 
> you are doing thousands of these operations in a row that shouldn't matter.
>
> My biggest concern with making this is having multiple sort operators 
> might be confusing without good detailed documentation about what stable vs 
> unstable means.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/841a52e9-3b41-4236-a152-17ccbd3370f1%40googlegroups.com.

Reply via email to