首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >new Scala() instanceof Java A Comparison of the Memory Behaviour of Java and Scala Programs
【24h】

new Scala() instanceof Java A Comparison of the Memory Behaviour of Java and Scala Programs

机译:Java的新Scala()实例Java和Scala程序的内存行为比较

获取原文
获取原文并翻译 | 示例
           

摘要

While often designed with a single language in mind, managed runtimes like the Java virtual machine (JVM) have become the target of not one but many languages, all of which benefit from the runtime’s services. One of these services is automatic memory management. In this paper, we compare and contrast the memory behaviour of programs written in Java and Scala, respectively, two languages which both target the same platform: the JVM. We both analyze core object demographics like object lifetimes as well as secondary properties of objects like their associated monitors and identity hash-codes. We find that objects in Scala programs have lower survival rates and higher rates of immutability, which is only partly explained by the memory behaviour of objects representing closures or boxed primitives. Other metrics vary more by benchmark than language.
机译:尽管通常只考虑一种语言来设计,但诸如Java虚拟机(JVM)之类的托管运行时已成为多种语言的目标,而所有语言均受益于运行时的服务。这些服务之一是自动内存管理。在本文中,我们分别比较和对比了用Java和Scala编写的程序的内存行为,这两种语言都针对同一平台:JVM。我们都分析了核心对象的人口统计信息,例如对象生存期,以及对象的次要属性,例如其关联的监视器和标识哈希码。我们发现Scala程序中的对象具有较低的生存率和较高的不变性,这只能由表示闭包或盒装基元的对象的存储行为来部分解释。其他指标与基准相比,语言差异更大。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号