Description
When a program read an array in Dataset, the code generator create some copy operations. If an array is for primitive type, there are some opportunities for optimizations in generated code to reduce runtime overhead.
val ds = Seq(Array(1.0, 2.0, 3.0), Array(4.0, 5.0, 6.0)).toDS() ds.map(p => { var s = 0.0 for (i <- 0 to 2) { s += p(i) } s }).show
Attachments
Issue Links
- links to