It depends on the use case.
If you're doing a one to one string comparison, equalsIgnoreCase is probably faster, since internally it just uppercases each character as it iterates through the strings (below code is from java.lang.String), which is slightly faster than uppercasing or lowercasing them all before performing the same comparison:
if (ignoreCase)
{
// If characters don't match but case may be ignored,
// try converting both characters to uppercase.
// If the results match, then the comparison scan should
// continue.
char u1 = Character.toUpperCase(c1);
char u2 = Character.toUpperCase(c2);
if (u1 == u2) {
continue;
}
// Unfortunately, conversion to uppercase does not work properly
// for the Georgian alphabet, which has strange rules about case
// conversion. So we need to make one last check before
// exiting.
if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) {
continue;
}
}
But when you have a situation where you want to do lookups against a data structure full of strings (especially strings that are all in the US Latin/ASCII space) in a case insensitive manner, it will be quicker to trim/lowercase the strings to be checked against and put them in something like a HashSet or HashMap.
This is better than calling equalsIgnoreCase on each element of a List because the slight performance gain of equalsIgnoreCase() is canceled out by the fact that you're basically doing a modified version of contains() against an array, which is O(n). With a pre-normalized string you can check against the entire list of strings with a single contains() call that runs in O(1).