stats_utils: making it even faster