numpy's matrix multiplication are written in c/c++ which means they can be pre-compiled to give better performance
compiling python code is posible if someone writes a compiler for it, through this is very hard and no one has done it yet, but there are compilers which compile some parts of the python code