From c50985d5c8e316c5c464f352e79eeebfed1121a9 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 21 Aug 2016 20:06:56 +0000 Subject: new tsearch implementation Rewrote the AVL tree implementation: - It is now non-recursive with fixed stack usage (large enough for worst case tree height). twalk and tdestroy are still recursive as that's smaller/simpler. - Moved unrelated interfaces into separate translation units. - The node structure is changed to use indexed children instead of left/right pointers, this simplifies the balancing logic. - Using void * pointers instead of struct node * in various places, because this better fits the api (node address is passed in a void** argument, so it is tempting to incorrectly cast it to struct node **). - As a further performance improvement the rebalancing now stops when it is not needed (subtree height is unchanged). Otherwise the behaviour should be the same as before (checked over generated random inputs that the resulting tree shape is equivalent). - Removed the old copyright notice (including prng related one: it should be licensed under the same terms as the rest of the project). .text size of pic tsearch + tfind + tdelete + twalk: x86_64 i386 aarch64 arm mips powerpc ppc64le sh4 m68k s390x old 941 899 1220 1068 1852 1400 1600 1008 1008 1488 new 857 881 1040 976 1564 1192 1360 736 820 1408 --- COPYRIGHT | 6 ------ 1 file changed, 6 deletions(-) (limited to 'COPYRIGHT') diff --git a/COPYRIGHT b/COPYRIGHT index 8c3a6d19..b8a76045 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -126,12 +126,6 @@ in jurisdictions that may not recognize the public domain. The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 Valentin Ochs and is licensed under an MIT-style license. -The BSD PRNG implementation (src/prng/random.c) and XSI search API -(src/search/*.c) functions are Copyright © 2011 Szabolcs Nagy and -licensed under following terms: "Permission to use, copy, modify, -and/or distribute this code for any purpose with or without fee is -hereby granted. There is no warranty." - The x86_64 port was written by Nicholas J. Kain and is licensed under the standard MIT terms. -- cgit 1.4.1