8. A computing device, comprising: at least one processor circuit; and at least one memory that stores instructions configured to be executed by the at least one processor circuit, the instructions configured to perform operations for transforming asynchronous code into more efficient, logically equivalent asynchronous code, the operations comprising: converting asynchronous program code into a first syntax tree, generating a dependency graph from the first syntax tree with each node of the dependency graph corresponding to a code statement and having an assigned weight, performing weighted topological sorting of the dependency graph to generate a sorted dependency graph, said performing weighted topological sorting including modifying an order of asynchronous code statements in the dependency graph based at least on weights assigned to nodes of the dependency graph; and converting the sorted dependency graph to refactored asynchronous code that is logically equivalent to the asynchronous program code.
8. A computing device, comprising: at least one processor circuit; and at least one memory that stores instructions configured to be executed by the at least one processor circuit, the instructions configured to perform operations for transforming asynchronous code into more efficient, logically equivalent asynchronous code, the operations comprising: converting asynchronous program code into a first syntax tree, generating a dependency graph from the first syntax tree with each node of the dependency graph corresponding to a code statement and having an assigned weight, performing weighted topological sorting of the dependency graph to generate a sorted dependency graph, said performing weighted topological sorting including modifying an order of asynchronous code statements in the dependency graph based at least on weights assigned to nodes of the dependency graph; and converting the sorted dependency graph to refactored asynchronous code that is logically equivalent to the asynchronous program code. 14. The computing device of claim 8 , where said converting the sorted dependency graph to refactored asynchronous code that is logically equivalent to the asynchronous program code comprises: generating a second syntax tree from the sorted dependency graph; and converting the second syntax tree into the refactored asynchronous code.