comparison tests/automated/hash-table-tests.el @ 4398:479443c0f95a

Have list hashes depend on the order of the contents, as is the case for vectors. src/ChangeLog addition: 2008-01-16 Aidan Kehoe <kehoea@parhasard.net> * elhash.c (internal_hash): Make short lists with the same contents in a different order hash distinctly. Gives better performance for things like three-element lists describing colours. Thank you Sebastian Freundt! tests/ChangeLog addition: 2008-01-16 Aidan Kehoe <kehoea@parhasard.net> * automated/hash-table-tests.el: Assert that two short lists with the same contents in distinct orders hash differently.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 16 Jan 2008 15:20:51 +0100
parents db7c7e251153
children 189fb67ca31a
comparison
equal deleted inserted replaced
4397:9e28067e3083 4398:479443c0f95a
279 ) 279 )
280 280
281 ;;; Test sxhash 281 ;;; Test sxhash
282 (Assert (= (sxhash "foo") (sxhash "foo"))) 282 (Assert (= (sxhash "foo") (sxhash "foo")))
283 (Assert (= (sxhash '(1 2 3)) (sxhash '(1 2 3)))) 283 (Assert (= (sxhash '(1 2 3)) (sxhash '(1 2 3))))
284 (Assert (/= (sxhash '(1 2 3)) (sxhash '(3 2 1))))