Item type |
Trans(1) |
公開日 |
2024-08-19 |
タイトル |
|
|
タイトル |
保守的なawaitのために同期的か非同期的かを実行時に切り替えるpotentially-async関数 |
タイトル |
|
|
言語 |
en |
|
タイトル |
Potentially-async Function that Switches between Synchronous and Asynchronous at Runtime for Conservative Awaiting |
言語 |
|
|
言語 |
jpn |
キーワード |
|
|
主題Scheme |
Other |
|
主題 |
[通常論文] async/await,プログラム変換,プリプロセス |
資源タイプ |
|
|
資源タイプ識別子 |
http://purl.org/coar/resource_type/c_6501 |
|
資源タイプ |
journal article |
著者所属 |
|
|
|
東京大学大学院情報理工学系研究科 |
著者所属 |
|
|
|
東京大学大学院情報理工学系研究科 |
著者所属 |
|
|
|
東京大学大学院情報理工学系研究科 |
著者所属(英) |
|
|
|
en |
|
|
Graduate School of Information Science and Technology, The University of Tokyo |
著者所属(英) |
|
|
|
en |
|
|
Graduate School of Information Science and Technology, The University of Tokyo |
著者所属(英) |
|
|
|
en |
|
|
Graduate School of Information Science and Technology, The University of Tokyo |
著者名 |
川向, 聡
山崎, 徹郎
千葉, 滋
|
著者名(英) |
Satoshi, Kawamukai
Tetsuro, Yamazaki
Shigeru, Chiba
|
論文抄録 |
|
|
内容記述タイプ |
Other |
|
内容記述 |
この論文では保守的に,非同期的かもしれない関数呼び出しにawaitを書くことでawait忘れを防ぐという方針について考える.JavaScriptのasync/await構文は非同期計算を記述するために便利であるが,しばしばawaitを書き忘れることが難しいバグの原因となる.しかし保守的なawaitでは,同期的な式のawaitのために計算効率が大幅に低下してしまう.我々は不要なawaitによるオーバーヘッドを削減するため,potentially-async関数を提案する.Potentially-async関数ではawait式は,オペランドが同期的か非同期的かを実行時に判断することで不要なawaitによるオーバーヘッドを削減できる.我々は実験によって不要なawaitが多いプログラムであれば実行時間を最大で90%程度削減できること,必要なawaitが多いプログラムでは最大で73%のオーバーヘッドが生じることを確認した.Potentially-async関数はプログラム変換によってJavaScriptプログラムに変換してから実行できるため,ブラウザ上でも実行することができる. |
論文抄録(英) |
|
|
内容記述タイプ |
Other |
|
内容記述 |
In this paper, we consider about an approach that conservatively writes awaits for potentially asynchronous function calls. Although async/await notation in JavaScript is useful to describe asynchronous computations, missing awaits often cause difficult bugs. However, conservatively awaiting significantly reduces execution speed due to awaiting for synchronous expressions. For reducing overheads due to unnecessary awaits, we propose potentially-async function. Potentially-async function can reduce the overhead due to unnecessary awaits because an await-expression changes its behavior depending on whether the operand is synchronous or asynchronous. Our experimental result shows that potentially-async function reduces execution time of programs with many unnecessary awaits by 90% at most, and it also causes another overhead that increases execution time of programs with many necessary awaits by 73% at most. We also provide a program transformation from potentially-async function declaration to async or non-async function declaration, thus one can execute potentially-async functions on their browsers. |
書誌レコードID |
|
|
収録物識別子タイプ |
NCID |
|
収録物識別子 |
AA11464814 |
書誌情報 |
情報処理学会論文誌プログラミング(PRO)
巻 17,
号 4,
p. 10-20,
発行日 2024-08-19
|
ISSN |
|
|
収録物識別子タイプ |
ISSN |
|
収録物識別子 |
1882-7802 |
出版者 |
|
|
言語 |
ja |
|
出版者 |
情報処理学会 |