When not to use Memoization in Ruby on Rails – Josh Software

When not to use Memoization in Ruby on Rails – Josh Software Memoization is a wonderful concept in programming world. It helps in writing clean code which execute faster. Example: def slow_method @result ||= perform_slow_method end In the above code, slow_method will cache perform_slow_method in @resultvariable, therefore perform_slow_method will execute only once. So, if memoization is wonderful then why not …

When not to use Memoization in Ruby on Rails – Josh Software Read More »