PHPLib is a set of code that makes your life with php easier... most of the time..
As with all code libraries, phplib contains tons of stuff and can do even more.
However, in your particular app you'll only ever use X percent of that.
So, if you use standard libraries like PHPlib, you are allways making php parse some code that is not used.
If you are after very high performance, you can't beat writing your own functions, simply because if you write them yourself, they will do exactly what you want, and nothing else.
The main drawback in writing your own functions is that the PHPlib people have already figured out which is the most efficient way of doing things.
If you write your own code, you'll have to re-invent parts of the wheel.