From 27873f1deb69745c79d403bbb8e1145bc18f55b8 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Fri, 13 May 2011 18:41:42 +0100 Subject: shuf: use memory more efficiently when returning a subset * gl/lib/randperm.c (randperm_new): When the number of items to return H, is much smaller than the total number of items N, use a hash to represent the sparse permutations of the set N. This is currently enabled for N > 128K and N/H > 32. * tests/misc/shuf: Ensure shuf can quickly return 2 numbers from a large range. * gl/modules/randperm: Depend on hash. * NEWS: Mention the change. --- gl/modules/randperm | 1 + 1 file changed, 1 insertion(+) (limited to 'gl/modules') diff --git a/gl/modules/randperm b/gl/modules/randperm index 9cef78271..daf9e3215 100644 --- a/gl/modules/randperm +++ b/gl/modules/randperm @@ -8,6 +8,7 @@ lib/randperm.h Depends-on: randint xalloc +hash configure.ac: -- cgit v1.2.3-70-g09d2