{"title":"Recursive Convergence","authors":"Amy MacDonough","doi":"10.1145/3017680.3022457","DOIUrl":null,"url":null,"abstract":"Ideally, we would always be able to write clear, concise programs and have them run quickly. One major impediment is the redundancy which can occur in direct recursive solutions. In some cases, this means writing a loop even if the programmer is more comfortable thinking in terms of recursion. In other cases the impact on code is even more dramatic, and in these cases most programmers choose to sacrifice clarity in exchange for improved asymptotic complexity. There exist program transformation techniques that would allow us to write idiomatic recursive programs without losing efficiency. One such transformation is the \"tupling\" transformation, which can and has been implemented as an automatic compiler optimization. This transformation is, however, only applicable to a narrow class of problems. We are exploring related transformations, such as tabulation, which can helpfully be applied to a wider class of recursive programs, and attempting to answer the question of when these transformation techniques are most useful to programmers aiming to balance program clarity with performance.","PeriodicalId":344382,"journal":{"name":"Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education","volume":"86 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-03-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3017680.3022457","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Ideally, we would always be able to write clear, concise programs and have them run quickly. One major impediment is the redundancy which can occur in direct recursive solutions. In some cases, this means writing a loop even if the programmer is more comfortable thinking in terms of recursion. In other cases the impact on code is even more dramatic, and in these cases most programmers choose to sacrifice clarity in exchange for improved asymptotic complexity. There exist program transformation techniques that would allow us to write idiomatic recursive programs without losing efficiency. One such transformation is the "tupling" transformation, which can and has been implemented as an automatic compiler optimization. This transformation is, however, only applicable to a narrow class of problems. We are exploring related transformations, such as tabulation, which can helpfully be applied to a wider class of recursive programs, and attempting to answer the question of when these transformation techniques are most useful to programmers aiming to balance program clarity with performance.