Array#map vs. Enumerator::Lazy for memory-efficient transformations
When processing large datasets in Ruby, the choice between immediate array mapping and lazy evaluation significantly impacts memory consumption. Using Array#map immediately materializes a complete new array in memory before any subsequent operations are performed. This can lead to high RSS usage if the source collection is large and only a subset is eventual