Porting my Integer Sorting Algorithms to D

Russel Winder russel at winder.org.uk
Sun Feb 23 07:10:14 PST 2014


On Sun, 2014-02-23 at 14:09 +0000, "Nordlöw" wrote:
> I have a couple of self-implemented C++ integer sort algorithms 
> lying around in my codebase.

What is the basic sort algorithm? Radix sort is generally seen as the
best for sorting integer values currently. But that doesn't mean there
is better, just that that is the one to beat.

Which requires benchmarks. Which requires a framework for running
benchmarks. As far as I am aware D hasn't got one of these as yet, but
it needs one. Such things exists in Python (I am currently playing with
benchmark) and , I am sure, other dynamic languages. It should be
relatively easy to do something with D.
  
> I also have a parallel merge sort on top of them that uses Intel 
> TBB to give some
> further speedups.

std.parallelism needs some work to compete with TBB. Though I am not
sure "like" is a term I would use for the TBB API.

> I have tweaked them to also work for floats and doubles, through 
> some interesting bit-fiddling tips I found on the net.
> 
> Would anybody be interested in reviewing these to give 
> suggestions on how to best port it to Phobos?

I guess I just volunteered.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



More information about the Digitalmars-d mailing list