This file contains 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
val mappedName = "com.blah.X.y.MyType" | |
val splitName = mappedName.split('.') | |
val exceptLast = splitName.dropRight(1) | |
val terms = exceptLast.map(newTermName(_)) | |
val (first, second) = (terms(0), terms(1)) | |
val accessorSelect = terms.drop(2).foldLeft(Select(Ident(first), second)) { | |
case (existing, next) => |
This file contains 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
[info] 0% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=5, max=10, numHLL=10} 1549.60 ns; σ=14.49 ns @ 3 trials | |
[info] 2% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=10, max=10, numHLL=10} 1747.76 ns; σ=59.56 ns @ 10 trials | |
[info] 3% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=17, max=10, numHLL=10} 1706.26 ns; σ=1.00 ns @ 3 trials | |
[info] 5% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=20, max=10, numHLL=10} 1672.16 ns; σ=33.41 ns @ 10 trials | |
[info] 7% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=5, max=100, numHLL=10} 1289.51 ns; σ=12.45 ns @ 3 trials | |
[info] 8% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=10, max=100, numHLL=10} 1687.68 ns; σ=35.01 ns @ 10 trials | |
[info] 10% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=17, max=100, numHLL=10} 1744.20 ns; σ=30.19 ns @ 10 trials | |
[info] 12% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=20, max=100, numHLL=10} 1675.37 ns; σ=30.35 ns @ 10 trials | |
[info] 13% Scenario{vm=java, trial |
This file contains 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
[info] Formatting 1 Scala source {file:/Users/ioconnell/workspace/github/algebird/}algebird-caliper(test) ... | |
[info] Formatting 1 Scala source {file:/Users/ioconnell/workspace/github/algebird/}algebird-core(compile) ... | |
[info] Compiling 1 Scala source to /Users/ioconnell/workspace/github/algebird/algebird-core/target/scala-2.10/classes... | |
[info] Compiling 6 Scala sources to /Users/ioconnell/workspace/github/algebird/algebird-caliper/target/scala-2.10/test-classes... | |
[info] Running com.google.caliper.Runner com.twitter.algebird.caliper.HLLPresentBenchmark | |
[info] 0% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=5, max=10, numHLL=10} 1217.34 ns; σ=60.94 ns @ 10 trials | |
[info] 2% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=10, max=10, numHLL=10} 1065.77 ns; σ=21.95 ns @ 10 trials | |
[info] 3% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=17, max=10, numHLL=10} 1127.64 ns; σ=7.16 ns @ 3 trials | |
[info] 5% Scenario{vm=java, trial=0, benchmark=BatchCreate, bits=20, max=10, numHLL=10} 1054. |
This file contains 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
/* | |
GUI settings used: | |
{ | |
"server": "127.0.0.1:5556", | |
"server_type": "ws", | |
"workspaces": [ | |
{ | |
"name": "Riemann", | |
"view": { | |
"type": "Balloon", |
This file contains 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 com.twitter.algebird.Semigroup | |
case class ClockCache[K, V](cacheSize: Int, maxHits: Int = 10 ) | |
(implicit sg: Semigroup[V]) { | |
private class CacheElement { | |
var hits: Int = 0 | |
var cacheHit: Int = 0 | |
var key: Any = null |
NewerOlder