In versions prior to 7.4, subqueries were joined to outer queries by sequentially scanning the result of the subquery for each row of the outer query. If the subquery returns only a few rows and the outer query returns many rows, IN is fastest. To speed up other queries, replace IN with EXISTS:
WHERE col IN (SELECT subcol FROM subtab);
WHERE EXISTS (SELECT subcol FROM subtab WHERE subcol = col);
For this to be fast, subcol should be an indexed column.