perf: avoid branching on pool type