]> mj.ucw.cz Git - libucw.git/commitdiff
Created a local TODO list.
authorMartin Mares <mj@ucw.cz>
Sat, 10 Feb 2007 20:39:58 +0000 (21:39 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 10 Feb 2007 20:39:58 +0000 (21:39 +0100)
lib/sorter/TODO [new file with mode: 0644]
lib/sorter/govern.c
lib/sorter/s-fixint.h
lib/sorter/s-radix.h
lib/sorter/s-twoway.h
lib/sorter/sort-test.c

diff --git a/lib/sorter/TODO b/lib/sorter/TODO
new file mode 100644 (file)
index 0000000..49479aa
--- /dev/null
@@ -0,0 +1,17 @@
+Testing:
+o  Giant runs.
+o  Records of odd lengths.
+o  Empty files.
+
+Improvements:
+o  Alignment? Use of SSE?
+o  Use radix-sort for internal sorting.
+o  Parallelization of internal sorting.
+o  Clean up data types and make sure they cannot overflow. (size_t vs. u64 vs. sh_off_t vs. uns)
+o  Buffer sizing in internal sorters.
+o  Switching between direct and normal I/O.
+o  When merging, choose the output file with less runs instead of always switching?
+o  Implement multi-way merge.
+o  Mode with only 2-way unification?
+o  Speed up 2-way merge.
+o  Speed up radix splitting.
index ddf919e2065d54e4f624dfed6f4a0bf3838f91ba..1211a81cfe55e912d87c1b9fab4bfb875681f4bd 100644 (file)
@@ -228,8 +228,6 @@ sorter_run(struct sort_context *ctx)
   clist_init(&ctx->bucket_list);
   sorter_prepare_buf(ctx);
 
-  /* FIXME: Remember to test sorting of empty files */
-
   // Create bucket containing the source
   struct sort_bucket *bin = sbuck_new(ctx);
   bin->flags = SBF_SOURCE | SBF_OPEN_READ;
@@ -238,7 +236,7 @@ sorter_run(struct sort_context *ctx)
   else
     bin->fb = ctx->in_fb;
   bin->ident = "in";
-  bin->size = ctx->in_size;            /* FIXME: Sizes should be either sh_off_t or u64, not both; beware of ~0U */
+  bin->size = ctx->in_size;
   bin->hash_bits = ctx->hash_bits;
   clist_add_tail(&ctx->bucket_list, &bin->n);
   SORT_XTRACE(2, "Input size: %s", F_BSIZE(bin));
index 9148509360f878ef73a2f7e31eacbdbc8519df1c..3d82313e933dd4b87936b63a154083ed437ce2a5 100644 (file)
@@ -19,7 +19,7 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct
   sorter_alloc_buf(ctx);
   struct fastbuf *in = sbuck_read(bin);
   P(key) *buf = ctx->big_buf;
-  size_t bufsize = ctx->big_buf_half_size;     /* FIXME: In some cases, we can use the whole buffer */
+  size_t bufsize = ctx->big_buf_half_size;
 #ifdef CPU_64BIT_POINTERS
   bufsize = MIN((u64)bufsize, (u64)~0U * sizeof(P(key)));      // The number of records must fit in uns
 #endif
index c83d6049996df7ead4ea2f59002f2c33115a86a3..0b5f5e9ff2be852991c1c61c5b2e75064868d1c0 100644 (file)
@@ -7,8 +7,6 @@
  *     of the GNU Lesser General Public License.
  */
 
-/* FIXME: This is a very trivial implementation so far. Use fbdirect and such things to speed up. */
-
 #include <string.h>
 
 static void P(radix_split)(struct sort_context *ctx UNUSED, struct sort_bucket *bin, struct sort_bucket **bouts, uns bitpos, uns numbits)
index 0e6d644260021d4171f86ca5a189f4269cb2e512..ef23a2e9339806b51bc2622379e0b9c6417d24d2 100644 (file)
@@ -7,9 +7,6 @@
  *     of the GNU Lesser General Public License.
  */
 
-/* FIXME: There is a plenty of room for further optimization */
-/* FIXME: Swap outputs if there already are some runs? */
-
 static void P(twoway_merge)(struct sort_context *ctx UNUSED, struct sort_bucket **ins, struct sort_bucket **outs)
 {
   struct fastbuf *fin1, *fin2, *fout1, *fout2, *ftmp;
index 5464f744fd1eb226d2af7df4a82d8b43805021fb..8cf1433f8e540b7626462b7541b51c91d6172b01 100644 (file)
@@ -410,7 +410,6 @@ static int s5_gen(struct s5_pair *p)
 
 static void s5_write_merged(struct fastbuf *f, struct key5 **keys, void **data, uns n, void *buf)
 {
-  /* FIXME: Allow mode where this function is not defined? */
   u32 *a = buf;
   uns m = 0;
   for (uns i=0; i<n; i++)