完整後設資料紀錄
DC 欄位語言
dc.contributor.author陳枝懋zh_TW
dc.contributor.author游逸平zh_TW
dc.contributor.authorChen, Chih-Maoen_US
dc.contributor.authorYou,Yi-Pingen_US
dc.date.accessioned2018-01-24T07:39:16Z-
dc.date.available2018-01-24T07:39:16Z-
dc.date.issued2017en_US
dc.identifier.urihttp://etd.lib.nctu.edu.tw/cdrfb3/record/nctu/#GT070356162en_US
dc.identifier.urihttp://hdl.handle.net/11536/140423-
dc.description.abstractJavaScript是開發Web應用程式的標準語言,並支援多種編程範形,例如指令式、函數式、物件導向程式設計等。其中函數式程式設計是一種視電腦程式為數學函數求值的方式,讓程式設計師能以更高階的方式撰寫程式。函數式程式設計經常使用高階函數以抽象化程式,但在JavaScript中使用高階函數可能造成效能上的影響。我們提出了一個JavaScript的編譯器將高階函數轉換為其對應的低階迴圈,使程式設計師可以使用高階函數撰寫程式也不失去程式的性能。我們轉換JavaScript至中介語言Thorin,並在其中找出可消除的高階函數,再使用Relooper演算法將其轉換回JavaScript。我們的實驗顯示它可以消除高階函數抽象化所造成的效能影響,而最佳化的程式和人為使用低階迴圈的程式效能相近。zh_TW
dc.description.abstractJavaScript is the de facto programming language for developing interactive Web applications. It supports multiple programming paradigms such as imperative, prototype-based object-oriented, and functional programming. Function programming, a style of treating computation as evaluation of mathematical functions, enables programmers to express algorithms in a higher-level form, thereby shielding programmers from dealing with low-level details and resulting in more readable and concise code. One of the building blocks of functional programming is the use of higher-order functions, which take one or more functions as arguments or return a function as their result. However, higher-order functions in JavaScript presents a serious performance cost when they are not identified and optimized in most JavaScript engines. In this thesis, we present a source-to-source compiler that attempts to rewrite higher-order functions into their corresponding loop forms, enabling programmers to use higher-order functions without sacrificing performance. We translate the JavaScript source to a functional, CPS-based IR based on Thorin, identify and eliminate higher-order functions, and then translate back to JavaScript using an adapted Relooper algorithm. Our experimental result shows that it is capable of eliminating the overhead introduced by HOF abstractions, and the performance of the optmized program is on par of hand-written ones using primitive control flow structures.en_US
dc.language.isoen_USen_US
dc.subjectJavaScriptzh_TW
dc.subject函數式程式設計zh_TW
dc.subject最佳化zh_TW
dc.subjectJavaScripten_US
dc.subjectFunctional Programmingen_US
dc.subjectOptimizationen_US
dc.title針對 JavaScript ⾼階函數的最佳化zh_TW
dc.titleHigher-Order Function Optimization in JavaScripten_US
dc.typeThesisen_US
dc.contributor.department資訊科學與工程研究所zh_TW
顯示於類別:畢業論文