bloom-filters: fewer fried quots
parent
713f0db0a2
commit
5a9aa07f15
|
@ -84,10 +84,10 @@ ERROR: invalid-n-objects ;
|
||||||
! support it, and I haven't done my own, but we'll go with it anyway.
|
! 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 )
|
: size-bloom-filter ( error-rate number-objects -- number-hashes number-bits )
|
||||||
'[ _ _ bits-to-satisfy-error-rate ]
|
[ n-hashes-range identity-configuration ] 2dip
|
||||||
'[ dup _ call 2array smaller-second ]
|
'[ dup [ _ _ bits-to-satisfy-error-rate ]
|
||||||
'[ n-hashes-range identity-configuration _ reduce ]
|
call 2array smaller-second ]
|
||||||
call
|
reduce
|
||||||
dup validate-sizes
|
dup validate-sizes
|
||||||
first2 ;
|
first2 ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue