title: Class-level memoization vs Constants. What is the difference? Which one to use?
body: <p>I am working on a rails app, where I have a class with a large constant. The reviewer asked me use a self method instead, stating that having a large constant will increase the application startup time. But I don't see the difference or the advantage.</p>
  <p>Can you please help me understand the difference?</p>
  <pre><code>class Test
    X = [1, 2, 3]
    def self.x
      @_x ||= [1, 2, 3]
    end
  end
  
  Test::X
  
  Test.x
  </code></pre>