Benchmarking shows that current code can be improved by up to 50% with separate versions for 2/3/4 inputs