Didn't benchmark - but I believe tr/X/X/ is still modifying the string on the backend (unless there is some unknown optimization).
It is better to leave off the second X as in tr/X//. This will not attempt to modify the string and will still return the count - as in:
perl -e '$a="aaa"; $i=$a=~tr/a//; print "($i)($a)\n";'
my @a=qw(random brilliant braindead); print $a[rand(@a)];