Efficient algorithms for simulation and analysis of many-body systems