New hashcode function

db4
Daniel Ehrenberg 2007-12-17 15:46:55 -05:00
parent cd86eb8feb
commit 416556ce63
1 changed files with 2 additions and 7 deletions

View File

@ -669,16 +669,11 @@ PRIVATE>
[ <column> dup like ] curry* map [ <column> dup like ] curry* map
] unless ; ] unless ;
! : sequence-hashcode ( n seq -- x )
! 0 -rot [
! hashcode* >fixnum swap 31 fixnum*fast fixnum+fast
! ] curry* each ; inline
: sequence-hashcode-step ( oldhash newpart -- newhash ) : sequence-hashcode-step ( oldhash newpart -- newhash )
swap [ swap [
dup -2 shift swap 5 shift dup -2 fixnum-shift >fixnum swap 5 fixnum-shift >fixnum
fixnum+fast fixnum+fast fixnum+fast fixnum+fast
] keep bitxor ; ] keep bitxor ; inline
: sequence-hashcode ( n seq -- x ) : sequence-hashcode ( n seq -- x )
0 -rot [ 0 -rot [