Optimizing Irregular Data Accesses For Cluster And Multicore Architectures