Reducing resource consumption of expandable collections: the pharo case
Author
dc.contributor.author
Bergel, Alexandre
Author
dc.contributor.author
Infante, Alejandro
Author
dc.contributor.author
Maass Olea, Sergio Andrés
Author
dc.contributor.author
Sandoval Alcocer, Juan
Admission date
dc.date.accessioned
2018-11-26T19:52:01Z
Available date
dc.date.available
2018-11-26T19:52:01Z
Publication date
dc.date.issued
2018-09
Cita de ítem
dc.identifier.citation
Science of Computer Programming Volumen: 161 Páginas: 34-56 Número especial: SI
es_ES
Identifier
dc.identifier.other
10.1016/j.scico.2017.12.009
Identifier
dc.identifier.uri
https://repositorio.uchile.cl/handle/2250/152916
Abstract
dc.description.abstract
Expandable collections are collections whose size may vary as elements are added and removed. Hash maps and ordered collections are popular expandable collections. Expandable collection classes offer an easy-to-use API, however this apparent simplicity is accompanied by a significant amount of wasted resources.
We describe some improvements of the collection library to reduce the amount of waste associated with collection expansions. We have designed two new collection libraries for the Pharo programming language that exhibit better resource management than the standard library. We improved the Pharo collection library using two complementary perspectives.
First, across a basket of 5 applications, our optimized collection library significantly reduces the memory footprint of the collections: (i) the amount of intermediary internal array storage by 73%, (ii) the number of allocated bytes by 67% and (iii) the number of unused bytes by 72%. This reduction of memory is accompanied by a speedup of about 3% for most of our benchmarks.
Second, we looked for an alternative to the classical expandable collection. The Lua programming language offers a unique abstract data type called table. We designed, implemented, and introduced this data type in the Pharo programming language and we ran a number of micro and macro-benchmarks. Overall, replacing the standard Pharo collection library by one inspired on Lua's table data type results in an execution speedup of up to 15% and a reduction of the memory consumption by up to 19%.
We analyzed the collection implementations of Java, C#, Scala, and Ruby: these implementations largely behave like Pharo's, therefore with the same limitations. Our results are thus likely to benefit designers of future programming languages and collection libraries. (C) 2017 Elsevier B.V. All rights reserved.
es_ES
Patrocinador
dc.description.sponsorship
LAM Research
CONICYT, Chile
CONICYT-PCHA/Doctorado Nacional para extranjeros
2013-63130199
CONICYT-PCHA/MagisterNacional
2015-22150809