How to turn a python extension into a C++ one?

I want to speedup the extension, and I wonder if this is a feasible way. and how to do it.