develooper Front page | perl.perl5.porters | Postings from September 2009

Re: dual pivot quicksort

Thread Previous | Thread Next
From:
Abigail
Date:
September 28, 2009 04:59
Subject:
Re: dual pivot quicksort
Message ID:
20090928115919.GD5424@almanda
On Fri, Sep 25, 2009 at 03:58:27PM +0100, Nicholas Clark quoted John P. Linderman:
> 
> With modern architectures, locality and pipelining
> can matter a bunch on real performance.  Somebody 
> in 2) observed that comparison is read-only, so it
> doesn't invalidate caches.  But it can break pipelining.
> And, if you are comparing *and* swapping native integers,
> you get huge locality wins, because everything you need
> is in the partition you are sorting.  If you are sorting
> pointers to things, not things, you don't get that huge
> locality win.


In Perl, comparison isn't always read-only. Even in the absense of ties
and overloads, there's always the string <-> number conversion that may
cause writes.



Abigail

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About