From 0717edbd26a75442d0aa8695d140243ec0b69b5d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 17 Jul 2019 07:37:11 -0700 Subject: 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. --- txr.1 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'txr.1') 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 -- cgit v1.2.3