Clojure: Multimethods vs Protocols

Let's measure how much multimethods are slower that protocols:

  • multimethods are roughly as fast as protocols
  • clojure maps as fast as records
  • "class" notation is in order of magnitude slower than "map" notation

Comments

daniil said…
> "class" notation is in order of magnitude slower than "map" notation

Isn't this because there is reflection involved when calling .price? Type-hinting the argument should solve this.

Popular posts from this blog

Haskell: performance

Regular expressions: Rust vs F# vs Scala

STM: F# vs Haskell