refactor: use Set() instead of array in benchmarking code