1. A computer-implemented method for increasing parallelization in a computer program, comprising: obtaining a binary associative operator and a ordered set of elements associated with a prefix operation in the computer program; dividing the elements into multiple sets of contiguous iterations based on a number of processors used to execute the computer program; performing, in parallel on the processors, a set of local reductions on the contiguous iterations using the binary associative operator; calculating a set of boundary prefixes between the contiguous iterations using the local reductions; and applying, in parallel on the processors, the boundary prefixes to the contiguous iterations using the binary associative operator to obtain a set of prefixes for the prefix operation.