in reply to Faster method needed?

Ignoring for now the larger issue of what exactly this code is supposed to do {g}, I would suggest that you fix the incorrect use of function prototypes.

Prototypes are not checked in method invocations, and if you were to try to call your function directly, as in Make_shiftedKey($self, $shiftval), you would generate a compile time error for having two arguments when your prototype specifies only one.