Skip to content

Commit 5154f36

Browse files
Merge pull request scala#11596 from dotty-staging/add-tuple-bench
Add micro bench test about tuples
2 parents 7f17a05 + 34e124d commit 5154f36

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BootstrappedOnlyCompilationTests {
2424
@Test def posMacros: Unit = {
2525
implicit val testGroup: TestGroup = TestGroup("compilePosMacros")
2626
aggregateTests(
27-
compileFilesInDir("tests/bench", defaultOptions),
27+
compileFilesInDir("tests/bench", defaultOptions.without("-Yno-deep-subtypes")),
2828
compileFilesInDir("tests/pos-macros", defaultOptions),
2929
compileFilesInDir("tests/pos-custom-args/semanticdb", defaultOptions.and("-Xsemanticdb")),
3030
compileDir("tests/pos-special/i7592", defaultOptions.and("-Yretain-trees")),

tests/bench/tuple.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
object Test {
2+
val xs0 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
3+
assert(xs0(15) == 16)
4+
// 2.787s
5+
6+
val xs1 = xs0 ++ xs0
7+
assert(xs1(31) == 16)
8+
// 3.354s
9+
}

0 commit comments

Comments
 (0)