Project

General

Profile

Actions

Patch #29305

closed

Use Hash#each_key instead of Hash#keys.each

Added by Go MAEDA over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hash#each_key is faster than Hash#keys.each because it does not allocate a new array when iterating keys. See https://github.com/JuanitoFatas/fast-ruby#hasheach_key-instead-of-hashkeyseach-code for details.


Files

Actions

Also available in: Atom PDF