summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-07-17 07:37:11 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-07-17 07:37:11 -0700
commit0717edbd26a75442d0aa8695d140243ec0b69b5d (patch)
tree3aecfe4f063a64194ccd3c260886ae918c80e7bc /txr.1
parente6dcc43d8bd7abd55de302d2599ce564ea2c9d78 (diff)
downloadtxr-0717edbd26a75442d0aa8695d140243ec0b69b5d.tar.gz
txr-0717edbd26a75442d0aa8695d140243ec0b69b5d.tar.bz2
txr-0717edbd26a75442d0aa8695d140243ec0b69b5d.zip
relate: optimize with hashes.
* lib.c (do_relate_hash, do_relate_hash_dfl): New static functions. (relate): If the number of keys and values is the same, and there are more than ten, then use hashing. If the default value is specified, and it is nil, then a hash table can be returned directly, instead of a function. * txr.1: Note added that relate may return a hash.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.15
1 files changed, 5 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 774b84c3..7c34fb88 100644
--- a/txr.1
+++ b/txr.1
@@ -29753,6 +29753,11 @@ function may be understood in terms of the following equivalences:
v))
.brev
+Note:
+.code relate
+may return a hash table instead of a function, if such an object
+can satisfy the semantics required by the arguments.
+
.TP* Examples:
.verb