public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Considering merge optimizations from Timsort in __move_merge_adaptive, __move_merge_adaptive_backward
@ 2018-07-03  4:16 jrmarsha
  2018-07-03 20:04 ` Carlos O'Donell
  0 siblings, 1 reply; 7+ messages in thread
From: jrmarsha @ 2018-07-03  4:16 UTC (permalink / raw)
  To: libc-help

Hello all,

I've been implementing a new version of Timsort in C++ using more 
standard facilities.  One thing I've come across which adds a divide 
between a larger codebase and faster code is the implementation of 
std::inplace_merge with sufficient memory.  This goes to the specific 
functions  __move_merge_adaptive, and __move_merge_adaptive_backward.  
In particular, there is an optimization where each insertion searches 
for the maximum number of elements it can move.  A brief in context 
explanation is here: 
https://en.wikipedia.org/wiki/Timsort#Individual_merges .  Would such a 
trick have a place in glibc or is the overhead likely too great in the 
general case?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-23 20:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03  4:16 Considering merge optimizations from Timsort in __move_merge_adaptive, __move_merge_adaptive_backward jrmarsha
2018-07-03 20:04 ` Carlos O'Donell
2018-07-03 20:10   ` jrmarsha
2018-07-03 23:30     ` Carlos O'Donell
2018-07-04 12:08       ` Adhemerval Zanella
2018-07-20  3:48       ` Joshua Marshall
2018-07-23 20:57         ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).