Patch #34399

Use sum { ... } instead of map { ... }.sum

Added by Go MAEDA about 1 month ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Performance
Target version:4.2.0

Description

The attached patch removes unnecessary map/collect method calls. I have generated the attached patch with rubocop-performance 1.9.0.

performance-sum.diff Magnifier (1.87 KB) Go MAEDA, 2020-12-06 02:28

Associated revisions

Revision 20581
Added by Go MAEDA about 1 month ago

Use sum { ... } instead of map { ... }.sum (#34399).

History

#1 Updated by Go MAEDA about 1 month ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch.

Also available in: Atom PDF