Instead of passing the level name around and turning it into a number over and
over, we now turn it into a number once at a public method entry point and
pass that number through to private methods instead of calling public methods
again.
This provides a speed increase in two ways. First, we do much less
validation. Previously we would repeatedly validate the same set of args in
many cases. Two, we only do the name->number lookup once.
Instead of passing the level name around and turning it into a number over and over, we now turn it into a number once at a public method entry point and pass that number through to private methods instead of calling public methods again.
This provides a speed increase in two ways. First, we do much less validation. Previously we would repeatedly validate the same set of args in many cases. Two, we only do the name->number lookup once.