]> mj.ucw.cz Git - libucw.git/commitdiff
Explain why we don't need the join hack for custom presorting.
authorMartin Mares <mj@ucw.cz>
Sat, 8 Sep 2007 20:40:29 +0000 (22:40 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 8 Sep 2007 20:40:29 +0000 (22:40 +0200)
lib/sorter/TODO
lib/sorter/govern.c

index 09e4986b50cb6ad85b96dc4e26312f5a13ff71f1..a86acf1e42cd3897ca1d69b5a3632851a3853b1c 100644 (file)
@@ -14,7 +14,6 @@ Improvements:
 o  Switching between direct and normal I/O. Should use normal I/O if the input is small enough.
 o  How does the speed of radix splitting decrease with increasing number of hash bits?
    Does it help to use more bits than we need, so that we sort less data in memory?
-o  Add automatic joining to the custom presorter interface?
 
 Users of lib/sorter/array.h which might use radix-sorting:
 indexer/chewer.c
index 13fc7a61404f801d5125f081423960cb9de0bebc..826417d1f6e3207c91eda5cc2a53efbb76390190 100644 (file)
@@ -48,6 +48,11 @@ sorter_presort(struct sort_context *ctx, struct sort_bucket *in, struct sort_buc
   sorter_alloc_buf(ctx);
   if (in->flags & SBF_CUSTOM_PRESORT)
     {
+      /*
+       *  The trick with automatic joining, which we use for the normal presorter,
+       *  is not necessary with the custom presorter, because the custom presorter
+       *  is never called in the middle of the sorted data.
+       */
       struct fastbuf *f = sbuck_write(out);
       out->runs++;
       return ctx->custom_presort(f, ctx->big_buf, ctx->big_buf_size);