improved perf unit test