From: Martin Mares Date: Tue, 11 Sep 2007 13:26:48 +0000 (+0200) Subject: Auto-tune radix-sort width according to CPU type. X-Git-Tag: holmes-import~506^2~13^2~17 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=abba1591284f92182b86d5e430472c62a73a70ad;p=libucw.git Auto-tune radix-sort width according to CPU type. --- diff --git a/lib/autoconf.cfg b/lib/autoconf.cfg index 4bd16617..b0e3c536 100644 --- a/lib/autoconf.cfg +++ b/lib/autoconf.cfg @@ -259,8 +259,14 @@ Set("PARTMAP_IS_MMAP") if IsSet("CPU_64BIT_POINTERS"); # Option for lib/mempool.c Set("POOL_IS_MMAP"); -# FIXME -Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12); +# Guess optimal bit width of the radix-sorter +if (Get("CPU_ARCH") eq "default" || Get("CPU_ARCH") =~ /^i[345]86$/) { + # This should be safe everywhere + Set("CONFIG_UCW_RADIX_SORTER_BITS" => 10); +} else { + # Use this on modern CPU's + Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12); +} # If debugging memory allocations: #LIBS+=-lefence