[Git][cmucl/cmucl][issue-240-set-diff-with-hash-table] Modify code so we only hash list2
Raymond Toy (@rtoy)
gitlab at common-lisp.net
Sat Jun 24 15:37:41 UTC 2023
Raymond Toy pushed to branch issue-240-set-diff-with-hash-table at cmucl / cmucl
Commits:
2e46d458 by Raymond Toy at 2023-06-24T08:35:33-07:00
Modify code so we only hash list2
Tests for when we hash list1 containing fixnums show that we're always
much slower that not hashing. But when list1 consists of strings,
we're always better hashing list1. So complicated.
So for now, just hash list2, like what clisp does.
- - - - -
1 changed file:
- src/code/list.lisp
Changes:
=====================================
src/code/list.lisp
=====================================
@@ -785,6 +785,7 @@
(l2 list2 (cdr l2)))
((cond ((endp l2)
(return (values length list2)))
+ #+nil
((endp l1)
(return (values length list1))))))
;; If the list is too short, the hashtable makes things
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2e46d4581f00c9d3a1df8b3fddeec396a48453d4
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2e46d4581f00c9d3a1df8b3fddeec396a48453d4
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20230624/d1804422/attachment.html>
More information about the cmucl-cvs
mailing list