Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Cacher in the Rye

Tsukasa OISHI
December 07, 2018

The Cacher in the Rye

Tsukasa OISHI

December 07, 2018
Tweet

More Decks by Tsukasa OISHI

Other Decks in Programming

Transcript

  1. Benchmark.driver do |x| x.report "AR", %|Restaurant.preload( :restaurant_score, :prefecture, :category_as ).find(1)|

    x.report "cache", %|Rails.cache.read(“1")| x.report "mono", %|Restaurant.find(1)| x.compare! end
  2. mono: 1887.1 i/s cache: 729.3 i/s - 2.59x slower AR:

    57.5 i/s - 32.84x slower 2.59ഒ΋ ஗͍! େมͩ!