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

被引:8
|
作者
Sewe, Andreas [1 ]
Mezini, Mira [1 ]
Sarimbekov, Aibek [2 ]
Ansaloni, Danilo [2 ]
Binder, Walter [2 ]
Ricci, Nathan [3 ]
Guyer, Samuel Z. [3 ]
机构
[1] Tech Univ Darmstadt, Darmstadt, Germany
[2] Univ Lugano, Lugano, Switzerland
[3] Tufts Univ, Medford, MA USA
基金
美国国家科学基金会; 瑞士国家科学基金会;
关键词
Languages; Measurement; Performance; Object demographics; !text type='Java']Java[!/text; Scala;
D O I
10.1145/2426642.2259010
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:97 / 108
页数:12
相关论文
共 50 条
  • [1] RINGS: An efficient Java']Java/Scala library for polynomial rings
    Poslavsky, Stanislav
    [J]. COMPUTER PHYSICS COMMUNICATIONS, 2019, 235 : 400 - 413
  • [2] Da Capo con Scala Design and Analysis of a Scala Benchmark Suite for the Java']Java Virtual Machine
    Sewe, Andreas
    Mezini, Mira
    Sarimbekov, Aibek
    Binder, Walter
    [J]. ACM SIGPLAN NOTICES, 2011, 46 (10) : 657 - 676
  • [3] Da Capo con Scala Design and Analysis of a Scala Benchmark Suite for the Java']Java Virtual Machine
    Sewe, Andreas
    Mezini, Mira
    Sarimbekov, Aibek
    Binder, Walter
    [J]. OOPSLA 11: PROCEEDINGS OF THE 2011 ACM INTERNATIONAL CONFERENCE ON OBJECT ORIENTED PROGRAMMING SYSTEMS LANGUAGES AND APPLICATIONS, 2011, : 657 - 676
  • [4] Exploiting Java']Java scientific libraries with the Scala language within the ScalaLab environment
    Papadimitriou, S.
    Terzidis, K.
    Mavroudi, S.
    Likothanassis, S.
    [J]. IET SOFTWARE, 2011, 5 (06) : 543 - 551
  • [5] ScalaLab: An Effective Scala-Based Scientific Programming Environment for Java']Java
    Papadimitriou, Stergios
    Terzidis, Konstantinos
    Mavroudi, Seferina
    Likothanassis, Spiridon
    [J]. COMPUTING IN SCIENCE & ENGINEERING, 2011, 13 (05) : 43 - 55
  • [6] Java']Java and Scala's Type Systems are Unsound The Existential Crisis of Null Pointers
    Amin, Nada
    Tate, Ross
    [J]. ACM SIGPLAN NOTICES, 2016, 51 (10) : 838 - 848
  • [7] Executing Java']Java programs with transactional memory
    Carlstrom, Brian D.
    Chung, JaeWoong
    Chafi, Hassan
    McDonald, Austen
    Minh, Chi Cao
    Hammond, Lance
    Kozyrakis, Christos
    Olukotun, Kunle
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2006, 63 (02) : 111 - 129
  • [8] Combining Functional and Imperative Programming for Multicore Software: An Empirical Study Evaluating Scala and Java']Java
    Pankratius, Victor
    Schmidt, Felix
    Garreton, Gilda
    [J]. 2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 123 - 133
  • [9] Dynamic memory allocation Behavior in Java']Java programs
    Li, RCL
    Fong, AS
    Chun, HW
    Tam, CH
    [J]. COMPUTERS AND THEIR APPLICATIONS, 2001, : 362 - 365
  • [10] Estimating internal memory fragmentation for Java']Java programs
    Skotiniotis, T
    Chang, JEM
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2002, 64 (03) : 235 - 246