]> mj.ucw.cz Git - libucw.git/commitdiff
Cleanup FIXME's.
authorMartin Mares <mj@ucw.cz>
Sat, 8 Sep 2007 14:07:59 +0000 (16:07 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 8 Sep 2007 14:07:59 +0000 (16:07 +0200)
lib/sorter/TODO
lib/sorter/govern.c

index f4fe053d8666e01d8f6536b01917fc279c9f4935..f36cc1cebcdc477c0a38054eae02576c2df730ea 100644 (file)
@@ -3,10 +3,15 @@ o  Giant runs.
 o  Records of odd lengths.
 o  Empty files.
 
-Improvements:
+Cleanups:
 o  Clean up data types and make sure they cannot overflow. (size_t vs. u64 vs. sh_off_t vs. uns)
+o  Log messages should show both original and new size of the data. The speed
+   should be probably calculated from the former.
+o  Automatically tune ASORT_MIN_RADIX, ASORT_MIN_SHIFT and especially ASORT_RADIX_BITS.
+o  Check undefs in sorter.h and array.h.
+
+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  Log messages should show both original and new size of the data. The speed
-   should be probably calculated from the former.
+o  Add automatic joining to the custom presorter interface?
index 2626d62b9a73689fb866d92da2257d7e4b9f8ae1..13fc7a61404f801d5125f081423960cb9de0bebc 100644 (file)
@@ -50,7 +50,7 @@ sorter_presort(struct sort_context *ctx, struct sort_bucket *in, struct sort_buc
     {
       struct fastbuf *f = sbuck_write(out);
       out->runs++;
-      return ctx->custom_presort(f, ctx->big_buf, ctx->big_buf_size);  // FIXME: out_only optimization?
+      return ctx->custom_presort(f, ctx->big_buf, ctx->big_buf_size);
     }
   return ctx->internal_sort(ctx, in, out, out_only);
 }
@@ -325,7 +325,7 @@ sorter_decide(struct sort_context *ctx, struct sort_bucket *b)
   // How many bits of bucket size we have to reduce before it fits in the RAM?
   // (this is insanely large if the input size is unknown, but it serves our purpose)
   u64 insize = sbuck_size(b);
-  u64 mem = ctx->internal_estimate(ctx, b) * 0.8;      // FIXME: Magical factor for various non-uniformities
+  u64 mem = ctx->internal_estimate(ctx, b) * 0.8;      // Magical factor accounting for various non-uniformities
   uns bits = 0;
   while ((insize >> bits) > mem)
     bits++;