]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/govern.c
Use a different file access method for small inputs.
[libucw.git] / lib / sorter / govern.c
index 619b351d4690db9d4d4ad124d1c1afc7c8f81943..5ce884732a4209a44c962890c0df3de90d594804 100644 (file)
@@ -413,6 +413,7 @@ sorter_run(struct sort_context *ctx)
   bin->hash_bits = ctx->hash_bits;
   clist_add_tail(&ctx->bucket_list, &bin->n);
   SORT_XTRACE(2, "Input size: %s, %d hash bits", F_BSIZE(bin), bin->hash_bits);
+  ctx->fb_params = (bin->size < sorter_small_input) ? &sorter_small_fb_params : &sorter_fb_params;
 
   // Create bucket for the output
   struct sort_bucket *bout = sbuck_new(ctx);