1. A method comprising: receiving source code for a stream processing application, wherein the source code comprises an operator flow graph, wherein the operator flow graph comprises a plurality of operators; receiving profiling data associated with the plurality of operators and one or more processing requirements of the operators; defining a candidate partition as a coalescing of one or more of the operators into one or more sets of processing elements (PEs); using the profiling data to create one or more candidate partitions of the processing elements; using the one or more candidate partitions to choose a desired partitioning of the operator flow graph; and compiling the source code into an executable code based on the desired partitioning.