improved efficiency of SlimListSerializer - for a list of length n reduced runtime from O(n^2) to O(n)