improve performance of dispatcher

Link: https://github.com/GeneAssembly/biosal/issues/508
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>