Did you know? the Profiler can speed up your codeSearch Documentation:
SWI-Prolog owl logoPredicate all_distinct/1