Escaping a query is necessary to distinguish values from commands:
SELECT * FROM foo WHERE name = 'O'Connor'
It's not readily comprehensible for the parser that the '
in "O'Connor" belongs to the value, it'll take it as terminating the string. Escaping helps the parser distinguish that:
SELECT * FROM foo WHERE name = 'O\'Connor'
Prepared statements are sent to the database in two steps: first the commands, then the values:
command: SELECT * FROM foo WHERE name = ?
value: O'Connor
This makes it unambiguous for the parser. As a result, you do not need to escape the value, since the only reason you need to escape the value does not apply anymore. That's also why it's more secure, since you can never not escape the value and fall pray to SQL injection.
As for speed, it shouldn't change much for a single query. If you reuse the same prepared query several times with different values, it'll help improve performance since the database doesn't need to parse the whole query again and again.
If you want a more in-depth introduction: The Great Escapism (Or: What You Need To Know To Work With Text Within Text)