Well, the == part of the operation is certainly faster if the intern() parts have already been done. But I'm sure an equals() will be faster than two intern() calls plus an ==, and it's probably faster than a single intern() plus == as well. So this approach really makes sense only if you expect to do comparisons more than once for each value, so you only pay the overhead of interning once, and reap its subsequent benefits on each compare. But I'm too lazy to do actual tests of this theory right now, so you should probably test both methods under various conditions to see which is really faster.
"I'm not back." - Bill Harding, Twister
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
SKIP - a book about connecting industrious people with elderly land owners