{"title":"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":"{\"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}","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

摘要

我们将研究使用JavaScript作为编译目标时如何表示对象。这是一个有趣的问题,因为JavaScript是希望部署到“Internet”的编译器编写者选择的目标语言,而且因为JavaScript提供了许多方式来表达同一件事。我们研究了三个可变性轴:对象的方法是存储在对象本身中,还是存储在原型中;对象是使用Javascript的闭包还是构建自己的闭包,对象的字段是直接访问还是通过访问器方法访问。结果显示,某些变异的速度比其他变异快100倍以上。我们的结论是,我们所做的特定选择可能是至关重要的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
The performance of object encodings in JavaScript
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
The performance of object encodings in JavaScript Efficient profiling of actor-based applications in parallel and distributed systems Trufflereloader: a low-overhead language-neutral reloader Demo of docking: enabling language based dynamic coupling Growing an abstract grammar: teaching language engineering
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1