bloom-filters: fewer fried quots

db4
Alec Berryman 2009-05-10 19:41:39 -04:00
parent 713f0db0a2
commit 5a9aa07f15
1 changed files with 4 additions and 4 deletions

View File

@ -84,10 +84,10 @@ ERROR: invalid-n-objects ;
! support it, and I haven't done my own, but we'll go with it anyway.
!
: size-bloom-filter ( error-rate number-objects -- number-hashes number-bits )
'[ _ _ bits-to-satisfy-error-rate ]
'[ dup _ call 2array smaller-second ]
'[ n-hashes-range identity-configuration _ reduce ]
call
[ n-hashes-range identity-configuration ] 2dip
'[ dup [ _ _ bits-to-satisfy-error-rate ]
call 2array smaller-second ]
reduce
dup validate-sizes
first2 ;