This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
class Super[+A] { | |
def foreach[U](f: A => U): Unit = ??? | |
} | |
final class Ranged(i0: Int, iN: Int) extends Super[Int] { | |
override def foreach[@specialized(Unit) U](f: Int => U) { | |
var i = i0 | |
while (i < iN) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ichi.bench._ | |
object GroupByBench { | |
class Sum(var value: Int = 0) { | |
def ++(): this.type = { value += 1; this } | |
} | |
val a1k = Array.tabulate(1024)(i => ((i*7) % 13).toString) | |
val l1k = a1k.toList | |
val v1k = a1k.toVector |
NewerOlder