You asked how reliable they are, then you asked about speed.
The STL that comes with g++ is definitely reliable - that is, you can rely on it to give the right answer. It is the most widely used C++ compiler in academia and furthermore SPOJ uses an older version (4.1) so if there had been a bug it would have been pointed out and fixed long ago.
As for speed, the best way to answer that would be to code your own and run a benchmark.
You will probably not be able to write a function equivalent to sort() which outperforms that found in the algorithm header.
However, in certain cases you can improve performance by coding your own algorithms/data structures. One of the more common examples is the STL priority_queue, which does not allow you to increase the priority of an element. Instead, you have to push on a new element with higher priority, and ignore the lower one once it is popped. This becomes important in Dijkstra's and Prim's algorithms, where the constant factor is reduced if you implement increase-key yourself.