Yeah, Ruby (it's a programming language) does. Equivalent C++ code will run faster than Ruby code, because Ruby is interpreted (depending on your definition of "equivalent").
Your multiplication function has been tested and works correctly, right? We can't see what's wrong until we see the actual code for your exponentiation algorithm.