1) hash and hasheq are stored as Objects, which seems kind of gross. It would be much better to store them as primitive longs and check whether they'd been calculated by comparing to 0. We still end up with a long -> int conversion but at least we'd avoid boxing.
2) assoc wrongly copies over the __hash and __hasheq to the new instance:
(defrecord R [a])
(def r (->R "abc"))
(hash r) ;; -1544829221
(hash (assoc r :a "def")) ;; -1544829221
3) Needs some tests if they don't already exist:
- with-meta on a record should not affect hashcode
- modifying a record with assoc or dissoc should affect hashcode
- maybe something else?
4) Needs some perf tests with a handful of example records (at least: 1 field, many fields, extmap, etc).
Nicola, I'm happy to let you continue to do dev on this patch with me doing the screening if you have time. Or if you don't have time, let me know and I (or someone else) can work on the dev parts. Would like to get this prepped and clean for 1.8.