Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sql/core/benchmarks/WideTableBenchmark-results.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ OpenJDK 64-Bit Server VM 1.8.0_191-b12 on Linux 3.10.0-862.3.2.el7.x86_64
Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
projection on wide table: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------
split threshold 10 38932 / 39307 0.0 37128.1 1.0X
split threshold 100 31991 / 32556 0.0 30508.8 1.2X
split threshold 1024 10993 / 11041 0.1 10483.5 3.5X
split threshold 2048 8959 / 8998 0.1 8543.8 4.3X
split threshold 4096 8116 / 8134 0.1 7739.8 4.8X
split threshold 8196 8069 / 8098 0.1 7695.5 4.8X
split threshold 65536 57068 / 57339 0.0 54424.3 0.7X
split threshold 10 39634 / 39829 0.0 37798.3 1.0X
split threshold 100 30121 / 30571 0.0 28725.8 1.3X
split threshold 1024 9678 / 9725 0.1 9229.9 4.1X
split threshold 2048 8634 / 8662 0.1 8233.6 4.6X
split threshold 4096 8561 / 8576 0.1 8164.6 4.6X
split threshold 8192 8393 / 8408 0.1 8003.8 4.7X
split threshold 65536 57063 / 57273 0.0 54419.1 0.7X


Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.spark.sql.execution.benchmark

import org.apache.spark.benchmark.Benchmark
import org.apache.spark.sql.Row
import org.apache.spark.sql.internal.SQLConf

/**
Expand All @@ -42,7 +43,7 @@ object WideTableBenchmark extends SqlBasedBenchmark {
Seq("10", "100", "1024", "2048", "4096", "8192", "65536").foreach { n =>
benchmark.addCase(s"split threshold $n", numIters = 5) { iter =>
withSQLConf(SQLConf.CODEGEN_METHOD_SPLIT_THRESHOLD.key -> n) {
df.selectExpr(columns: _*).foreach(identity(_))
df.selectExpr(columns: _*).foreach((x => x): Row => Unit)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we use foreach(_ => ())?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'll try to make another follow-ups with the benchmark result.

}
}
}
Expand Down