Clojure

Incremental hashcode calculation for collections

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code

Description

Reported by richhickey, Dec 17, 2008
So hachCode can be final, more efficient to calc as you go.
Formerly Google Code Issue 11

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/15
Hide
Christophe Grand added a comment -

Wouldn't the naive approach incur realizing lazy sequences when adding them to a list or a vector or as values in a map?

Show
Christophe Grand added a comment - Wouldn't the naive approach incur realizing lazy sequences when adding them to a list or a vector or as values in a map?
Alex Miller made changes -
Field Original Value New Value
Fix Version/s Backlog [ 10035 ]
Christophe Grand made changes -
Attachment lazy-incremental-hashes.diff [ 12206 ]
Hide
Christophe Grand added a comment -

The lazy-incremental-hashes.diff introduces lazy incremental hashes based on structural sharing.

Show
Christophe Grand added a comment - The lazy-incremental-hashes.diff introduces lazy incremental hashes based on structural sharing.
Christophe Grand made changes -
Patch Code [ 10001 ]
Priority Blocker [ 1 ]
Hide
Christophe Grand added a comment -

Why is this identified as Blocker?

Show
Christophe Grand added a comment - Why is this identified as Blocker?
Hide
Christophe Grand added a comment -

setting priority to minor

Show
Christophe Grand added a comment - setting priority to minor
Christophe Grand made changes -
Priority Blocker [ 1 ] Minor [ 4 ]
Hide
Andy Fingerhut added a comment -

I've seen this "edit a ticket, it changes to Priority=Blocker" behavior before. I believe some of the older tickets have no Priority field at all, and when you edit any of their properties, it creates the priority field with a default value of Blocker.

Show
Andy Fingerhut added a comment - I've seen this "edit a ticket, it changes to Priority=Blocker" behavior before. I believe some of the older tickets have no Priority field at all, and when you edit any of their properties, it creates the priority field with a default value of Blocker.
Hide
Alex Miller added a comment -

Yes, concur with Andy's explanation on priority change. I just bulk-edited all open CLJ tickets with null priority and set their priority.

Show
Alex Miller added a comment - Yes, concur with Andy's explanation on priority change. I just bulk-edited all open CLJ tickets with null priority and set their priority.
Alex Miller made changes -
Description {code}
Reported by richhickey, Dec 17, 2008
So hachCode can be final, more efficient to calc as you go.
{code}
{code}
Reported by richhickey, Dec 17, 2008
So hachCode can be final, more efficient to calc as you go.
Formerly Google Code Issue 11
{code}
Reporter Rich Hickey [ richhickey ]
Labels performance
Summary GC Issue 11: incremental hashcode calculation for collections Incremental hashcode calculation for collections
Alex Miller made changes -
Approval Triaged [ 10120 ]
Hide
Andy Fingerhut added a comment -

Patch lazy-incremental-hashes.diff still applies cleanly as of Jan 30 2014 latest Clojure master, but now fails tests due to recent commits involving hash changes. I have not checked how difficult or easy it might be to update the patch to pass tests again.

Show
Andy Fingerhut added a comment - Patch lazy-incremental-hashes.diff still applies cleanly as of Jan 30 2014 latest Clojure master, but now fails tests due to recent commits involving hash changes. I have not checked how difficult or easy it might be to update the patch to pass tests again.
Alex Miller made changes -
Approval Triaged [ 10120 ]
Hide
Andy Fingerhut added a comment -

Patch lazy-incremental-hashes.diff dated Aug 26 2013 no longer applied cleanly to latest master after some commits were made to Clojure on Aug 29, 2014. It did apply cleanly before that day.

I have not checked how easy or difficult it might be to update this patch.

Show
Andy Fingerhut added a comment - Patch lazy-incremental-hashes.diff dated Aug 26 2013 no longer applied cleanly to latest master after some commits were made to Clojure on Aug 29, 2014. It did apply cleanly before that day. I have not checked how easy or difficult it might be to update this patch.
Hide
Andy Fingerhut added a comment -

Patch lazy-incremental-hashes.diff dated Aug 26 2013 applies cleanly again to latest Clojure master as of Sep 5 2014, even though the patch has not been updated. I haven't checked, but I would guess this is because one of the changes made to Clojure master recently was reverted with this commit: https://github.com/clojure/clojure/commit/46be47c9f51ef10d0082f1bd39ffff1008682861

Show
Andy Fingerhut added a comment - Patch lazy-incremental-hashes.diff dated Aug 26 2013 applies cleanly again to latest Clojure master as of Sep 5 2014, even though the patch has not been updated. I haven't checked, but I would guess this is because one of the changes made to Clojure master recently was reverted with this commit: https://github.com/clojure/clojure/commit/46be47c9f51ef10d0082f1bd39ffff1008682861

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated: