From: Christophe Raffalli <christophe@raffalli.eu>
To: caml-list@inria.fr
Subject: [Caml-list] O(n ln k) sorting for ocaml on github and a challenge
Date: Fri, 8 Oct 2021 18:05:33 -1000 [thread overview]
Message-ID: <20211009040533.chu7kqqk27r5wcok@oulala> (raw)
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
Hello,
I just pushed on https://github.com/craff/block_sort.git an old piece of code: a
stable sorting algorithm which is in O(n ln k) where n is the size of the list
and k the number of changes of direction. It is often much faster than
List.sort, on my tests, never more than 10% slower. The tests are available on
github.
If people are interested I could provide a version for arrays.
A challenge would be to provide a O(n ln k) sorting on list that is always
faster than List.sort. Any ideas ?
Cheers,
Christophe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2021-10-09 4:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 4:05 Christophe Raffalli [this message]
2021-10-09 8:58 ` Mario Pereira
2021-10-09 19:59 ` Christophe Raffalli
2021-10-11 11:46 ` Niols
2021-10-11 21:27 ` Mario Pereira
2021-10-22 4:42 ` Kazuhiko Sakaguchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211009040533.chu7kqqk27r5wcok@oulala \
--to=christophe@raffalli.eu \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox