  We exhibit an online algorithm finding all distinct palindromes inside a
given string in time $\Theta(n\log|\Sigma|)$ over an ordered alphabet and in
time $\Theta(n|\Sigma|)$ over an unordered alphabet. Using a reduction from a
dictionary-like data structure, we prove the optimality of this algorithm in
the comparison-based computation model.
