A system comprising: one or more processors; and a memory that stores one or more computer-executable instructions that are configured to be executed by the one or more processors, the one or more computer-executable instructions to perform a method for providing code recommendations to improve the performance of a program, the method comprising: obtain a query having a target source code snippet (302, 902); extract structural features and performance features from the target source code snippet; access a code recommendation table (112, 1004), the code recommendation table including a plurality of documents, a document associated with a performance-improved source code snippet, the code recommendation table indexed by a set of difference features of the performance-improved source code snippet, the set of difference features including structural features and performance features that were present in code of a performance-improved source code snippet before changes were made but missing in improved code of the performance-improved source code snippet; search for documents in the code recommendation table having at least one performance feature matching at least one performance feature of the target source code snippet; compute a score for each document having at least one matching feature in the code recommendation table based on the structural features and performance features of the target source code snippet and the set of difference features of a document; and generate a code recommendation for the target source code snippet based on the performance-improved source code snippet associated with the document having a highest score, wherein the code recommendation comprises a modified version of the target source code snippet modified to improve its performance. one or more processors; and a memory that stores one or more computer-executable instructions that are configured to be executed by the one or more processors, the one or more computer-executable instructions to perform a method for providing code recommendations to improve the performance of a program, the method comprising: obtain a query having a target source code snippet (302, 902); extract structural features and performance features from the target source code snippet; access a code recommendation table (112, 1004), the code recommendation table including a plurality of documents, a document associated with a performance-improved source code snippet, the code recommendation table indexed by a set of difference features of the performance-improved source code snippet, the set of difference features including structural features and performance features that were present in code of a performance-improved source code snippet before changes were made but missing in improved code of the performance-improved source code snippet; search for documents in the code recommendation table having at least one performance feature matching at least one performance feature of the target source code snippet; compute a score for each document having at least one matching feature in the code recommendation table based on the structural features and performance features of the target source code snippet and the set of difference features of a document; and generate a code recommendation for the target source code snippet based on the performance-improved source code snippet associated with the document having a highest score, wherein the code recommendation comprises a modified version of the target source code snippet modified to improve its performance. obtain a query having a target source code snippet (302, 902); extract structural features and performance features from the target source code snippet; access a code recommendation table (112, 1004), the code recommendation table including a plurality of documents, a document associated with a performance-improved source code snippet, the code recommendation table indexed by a set of difference features of the performance-improved source code snippet, the set of difference features including structural features and performance features that were present in code of a performance-improved source code snippet before changes were made but missing in improved code of the performance-improved source code snippet; search for documents in the code recommendation table having at least one performance feature matching at least one performance feature of the target source code snippet; compute a score for each document having at least one matching feature in the code recommendation table based on the structural features and performance features of the target source code snippet and the set of difference features of a document; and generate a code recommendation for the target source code snippet based on the performance-improved source code snippet associated with the document having a highest score, wherein the code recommendation comprises a modified version of the target source code snippet modified to improve its performance.