Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[ANN] decundec, a decorate-sort-undecorate package

90 views
Skip to first unread message

Scott Pakin

unread,
Dec 14, 2024, 12:57:58 PM12/14/24
to golang-nuts
I'm pleased to announce the first release of decundec, a small package that speeds up the slices package's sort functions in cases where the user-provided comparison function applies a costly transformation to the values being compared.

decundec employs the decorate-sort-undecorate idiom, computing the costly transformation only once per element, sorting the transformed data, and stripping off the transformed values when finished.

See the decundec package page for more information, documentation, and examples.

— Scott
Reply all
Reply to author
Forward
0 new messages