summaryrefslogtreecommitdiff
path: root/test/files/presentation/private-case-class-members/src/State.scala
diff options
context:
space:
mode:
authorDenton Cockburn <kanielc@gmail.com>2014-12-13 21:46:25 -0500
committerDenton Cockburn <kanielc@gmail.com>2014-12-14 10:57:04 -0500
commit6e8c60eabbbf0f21ef8e0b87267952bec2f85159 (patch)
tree8c543503f0d4a815f24cd5dcc31fa7229db3e443 /test/files/presentation/private-case-class-members/src/State.scala
parentd9f623db0ff1d20040939fbb9e15d4d4e5887c75 (diff)
downloadscala-6e8c60eabbbf0f21ef8e0b87267952bec2f85159.tar.gz
scala-6e8c60eabbbf0f21ef8e0b87267952bec2f85159.tar.bz2
scala-6e8c60eabbbf0f21ef8e0b87267952bec2f85159.zip
SI-9043 ArrayBuffer.insert and insertAll are very slow
insert and insertAll were slower than their java equivalents by factors of 5 and 10 respectively. Benchmark code was provided here: https://gist.github.com/rklaehn/3e9290118fcf63d1feae We are using a toList to the source Traversable Then doing a length and a copy on that collection. By using an array, we can make use of faster methods. Managed to get the ratios down to 1.5 and 1.5 respectively. In addition to this, I think we should consider breaking insert into 2 separate methods, one for a single item and one for a collection. The varags version is very expensive when a single item is being inserted. @phaller @axel22
Diffstat (limited to 'test/files/presentation/private-case-class-members/src/State.scala')
0 files changed, 0 insertions, 0 deletions