The performance of object encodings in JavaScript

Forrest Alexander, A. Black
{"title":"The performance of object encodings in JavaScript","authors":"Forrest Alexander, A. Black","doi":"10.1145/3012408.3012417","DOIUrl":null,"url":null,"abstract":"We investigate how to represent objects when JavaScript is used as a compilation target. This is an interesting question because JavaScript is the target language of choice for compiler writers who wish to deploy to \"the Internet\", and because JavaScript offers many ways to say the same thing. We looked at three axes of variability: whether an object's methods are stored in the object itself, or in a prototype; whether the object uses Javascript's closures or builds its own, and whether an object's fields are accessed directly or via accessor methods. The results reveal that certain variations are more than a hundred times faster than others. We conclude that the particular choices we make may be critical.","PeriodicalId":186136,"journal":{"name":"Proceedings of the 11th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems","volume":"70 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 11th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3012408.3012417","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We investigate how to represent objects when JavaScript is used as a compilation target. This is an interesting question because JavaScript is the target language of choice for compiler writers who wish to deploy to "the Internet", and because JavaScript offers many ways to say the same thing. We looked at three axes of variability: whether an object's methods are stored in the object itself, or in a prototype; whether the object uses Javascript's closures or builds its own, and whether an object's fields are accessed directly or via accessor methods. The results reveal that certain variations are more than a hundred times faster than others. We conclude that the particular choices we make may be critical.
JavaScript中对象编码的性能
我们将研究使用JavaScript作为编译目标时如何表示对象。这是一个有趣的问题,因为JavaScript是希望部署到“Internet”的编译器编写者选择的目标语言,而且因为JavaScript提供了许多方式来表达同一件事。我们研究了三个可变性轴:对象的方法是存储在对象本身中,还是存储在原型中;对象是使用Javascript的闭包还是构建自己的闭包,对象的字段是直接访问还是通过访问器方法访问。结果显示,某些变异的速度比其他变异快100倍以上。我们的结论是,我们所做的特定选择可能是至关重要的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信