https://github.com/taskaz/labloom */ $number = (int) $_GET['number'] ? (int) $_GET['number'] : 1000; /* * Init object for $num entries **/ $bloom = new Bloom(array('entries_max' => $number, 'error_chance' => 0.01, 'hash' => array('strtolower' => false))); $foe = new LaBloom('123', $bloom->entries_max); while (count($vars) < $number) { $vars[] = substr(str_shuffle("abcdefghijklmnopqrstuvwxyz"), 0, 10); } /* * Insert to bloom **/ $stat['bloom']['insert']['s'] = get_stat(); $bloom->set($vars); $stat['bloom']['insert']['e'] = get_stat(); /* * Insert to array **/ $stat['foe']['insert']['s'] = get_stat(); //for( $i = 0; $i < $number; $i++ ) $foe->add($vars); $stat['foe']['insert']['e'] = get_stat(); while (count($check) < $number / 2) { $check[] = substr(str_shuffle("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10); } /* * Check existance with bloom **/ $stat['bloom']['has']['s'] = get_stat();