I was using PIL to do image processing, and I tried to convert a color image into a grayscale one, so I wrote a Python function to do that, meanwhile I know PIL already provides a convert function to this.
But the version I wrote in Python takes about 2 seconds to finish the grayscaling, while PIL's convert almost instantly. So I read the PIL code, figured out that the algorithm I wrote is pretty much the same, but
PIL's convert is written in C or C++.
So is this the problem making the performance's different?
Yes, coding the same algorithm in Python and in C, the C implementation will be faster.  This is definitely true for the usual Python interpreter, known as CPython.  Another implementation, PyPy, uses a JIT, and so can achieve impressive speeds, sometimes as fast as a C implementation.  But running under CPython, the Python will be slower.
performance concern, Python vs C