Skip to content

Instantly share code, notes, and snippets.

View joroKr21's full-sized avatar
🏠
Working from home

Georgi Krastev joroKr21

🏠
Working from home
View GitHub Profile

Understanding Comparative Benchmarks

I'm going to do something that I don't normally do, which is to say I'm going to talk about comparative benchmarks. In general, I try to confine performance discussion to absolute metrics as much as possible, or comparisons to other well-defined neutral reference points. This is precisely why Cats Effect's readme mentions a comparison to a fixed thread pool, rather doing comparisons with other asynchronous runtimes like Akka or ZIO. Comparisons in general devolve very quickly into emotional marketing.

But, just once, today we're going to talk about the emotional marketing. In particular, we're going to look at Cats Effect 3 and ZIO 2. Now, for context, as of this writing ZIO 2 has released their first milestone; they have not released a final 2.0 version. This implies straight off the bat that we're comparing apples to oranges a bit, since Cats Effect 3 has been out and in production for months. However, there has been a post going around which cites various compar

@milessabin
milessabin / typelevelcps.scala
Created May 29, 2018 10:13
Using type level continuation passing style to rewrite a whitebox macro (which relies on fundep materialization) as a blackbox macro
import scala.language.higherKinds
// Whitebox ...
trait Schema[T, R] {
def conv(t: T): R
}
object Schema {
// Whitebox macro: R is computed from T
implicit def mkSchema[T, R]: Schema[T, R] = ??? // macro ...
package leibniz.macros
import scala.reflect.macros.blackbox
import scala.annotation.StaticAnnotation
class newtype extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro NewTypeMacros.newtypeAnnotation
}
sealed abstract class SingletonOf[A, +B] {
}
object SingletonOf {
}
type <::[A, +B] = SingletonOf[A, B]
def single[A <: Singleton](a: A): SingletonOf[A, A] =
new SingletonOf[A, A] { }
@vasia
vasia / gist:11349886
Last active August 29, 2015 14:00
A list of applications used in evaluation sections of large-scale graph and iterative processing papers

Applications Used in Evaluation Sections of Large-Scale Graph & Iterative Processing Systems Papers (sorted by frequency)

Application Appears In
PageRank (and variations) 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24
Connected Components (and variations) 1 , 2, 6, 12, 13, 15, 16, 17, 19, 22, 23, 24
SSSP (and variations) 3, 6, 7, 10, 13, 14, 17, 22, 24
ALS 7, 14, 21, 23, 24
Belief Propagation (and variations) 4, 20, 21, 23, 24
Graph Coloring 7, 10, 12, 20
@alexandru
alexandru / ExecutorServiceWrapper.scala
Last active March 17, 2021 23:52
Wrapping a scala.concurrent.ExecutionContext into java.concurrent.ExecutorService
import concurrent.{Future, Await, Promise, ExecutionContext}
import java.util.concurrent.{Future => JavaFuture, TimeUnit, Callable, CancellationException, ExecutorService}
import concurrent.duration._
import scala.util.Success
import scala.util.Failure
import scala.util.control.NonFatal
import scala.collection.JavaConverters._
import concurrent.duration.TimeUnit
import java.{util => jutil}