完整後設資料紀錄
DC 欄位 | 值 | 語言 |
---|---|---|
dc.contributor.author | 陳枝懋 | zh_TW |
dc.contributor.author | 游逸平 | zh_TW |
dc.contributor.author | Chen, Chih-Mao | en_US |
dc.contributor.author | You,Yi-Ping | en_US |
dc.date.accessioned | 2018-01-24T07:39:16Z | - |
dc.date.available | 2018-01-24T07:39:16Z | - |
dc.date.issued | 2017 | en_US |
dc.identifier.uri | http://etd.lib.nctu.edu.tw/cdrfb3/record/nctu/#GT070356162 | en_US |
dc.identifier.uri | http://hdl.handle.net/11536/140423 | - |
dc.description.abstract | JavaScript是開發Web應用程式的標準語言,並支援多種編程範形,例如指令式、函數式、物件導向程式設計等。其中函數式程式設計是一種視電腦程式為數學函數求值的方式,讓程式設計師能以更高階的方式撰寫程式。函數式程式設計經常使用高階函數以抽象化程式,但在JavaScript中使用高階函數可能造成效能上的影響。我們提出了一個JavaScript的編譯器將高階函數轉換為其對應的低階迴圈,使程式設計師可以使用高階函數撰寫程式也不失去程式的性能。我們轉換JavaScript至中介語言Thorin,並在其中找出可消除的高階函數,再使用Relooper演算法將其轉換回JavaScript。我們的實驗顯示它可以消除高階函數抽象化所造成的效能影響,而最佳化的程式和人為使用低階迴圈的程式效能相近。 | zh_TW |
dc.description.abstract | JavaScript 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.iso | en_US | en_US |
dc.subject | JavaScript | zh_TW |
dc.subject | 函數式程式設計 | zh_TW |
dc.subject | 最佳化 | zh_TW |
dc.subject | JavaScript | en_US |
dc.subject | Functional Programming | en_US |
dc.subject | Optimization | en_US |
dc.title | 針對 JavaScript ⾼階函數的最佳化 | zh_TW |
dc.title | Higher-Order Function Optimization in JavaScript | en_US |
dc.type | Thesis | en_US |
dc.contributor.department | 資訊科學與工程研究所 | zh_TW |
顯示於類別: | 畢業論文 |