improve the performance of preaccumulation