branch: externals/trie commit a8bc50f997973eb0f0679ec197ae293ecf05bcf8 Author: Toby Cubitt <toby-predict...@dr-qubit.org> Commit: tsc25 <toby-predict...@dr-qubit.org>
Minor code tidying --- trie.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/trie.el b/trie.el index 0cd0760..f2d5aa1 100644 --- a/trie.el +++ b/trie.el @@ -1202,12 +1202,12 @@ element stored in the trie.)" ;; For queries ranked in anything other than lexical order, we use a partial ;; heap-sort to find the k=MAXNUM highest ranked matches among the n possibile ;; matches. This has worst-case time complexity O(n log k), and is both simple -;; and elegant. An optimal algorithm (e.g. partial quick-sort where the -;; irrelevant partition is discarded at each step) would have complexity O(n + -;; k log k), but is probably not worth the extra coding effort, and would have -;; worse space complexity unless coded to work "in-place", which would be -;; highly non-trivial. (I haven't done any benchmarking, though, so feel free -;; to do so and let me know the results!) +;; and elegant. An optimal algorithm (e.g. partial quick-sort discarding the +;; irrelevant partition at each step) would have complexity O(n + k log k), +;; but is probably not worth the extra coding effort, and would have worse +;; space complexity unless coded to work "in-place", which would be highly +;; non-trivial. (I haven't done any benchmarking, though, so feel free to do +;; so and let me know the results!) (defmacro trie--construct-accumulator (maxnum filter resultfun) ;; Does what it says on the tin! | sed -e 's/on/in/' -e 's/tin/macro name/'