What is "escaping mechanism"?
To prevent SQL injection.
And how to determine if it is not efficiency?
If you are escaping user input (or some other input), it is fine.
It is inefficiency in coding or processing?
What do you mean?
If it is inefficiency for processing, how to time it?
You can use microtime() to construct a primitive benchmarking script.