using BatList.unique_cmp (using Pervasives.compare) fixes Out_of_memory exception.
Just because of O(n log n) instead of O(n^2)?