15. 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 instructions comprising: a code-to-syntax tree converter configured to convert asynchronous program code into a first syntax tree; a dependency graph generator configured to generate 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; a topological sorter configured to perform weighted topological sorting of the dependency graph to generate a sorted dependency graph, wherein to perform weighted topological sorting, the topological sorter is configured to modify an order of asynchronous code statements in the dependency graph based at least on weights assigned to nodes of the dependency graph; and a graph-to-code converter configured to convert the sorted dependency graph to refactored asynchronous code that is logically equivalent to the asynchronous program code.
15. 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 instructions comprising: a code-to-syntax tree converter configured to convert asynchronous program code into a first syntax tree; a dependency graph generator configured to generate 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; a topological sorter configured to perform weighted topological sorting of the dependency graph to generate a sorted dependency graph, wherein to perform weighted topological sorting, the topological sorter is configured to modify an order of asynchronous code statements in the dependency graph based at least on weights assigned to nodes of the dependency graph; and a graph-to-code converter configured to convert the sorted dependency graph to refactored asynchronous code that is logically equivalent to the asynchronous program code. 19. The computing device of claim 15 , wherein the dependency graph generator includes: a variable follower configured to generate the dependency graph by following on variables resulting from each code statement of the first syntax tree; and a weight assigner configured to assign weights to the nodes of the dependency graph.