1. 13
  1.  

  2. 5

    The same metaprogamming tricks apply in ruby:

    https://gist.github.com/vjoel/a021e48b8752d0952dba

    This reduces the benchmark time from 3.5s on my system (compared, cautiously, to the author’s reported 118.62s).