Project

General

Profile

Actions

Feature #9143

closed

Optimize CSV to share hash key objects between rows

Added by avit (Andrew Vit) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Target version:
-
[ruby-core:58510]

Description

Currently, when CSV headers are strings, then each row receives a copy of the strings for hash keys. This patch is an optimization to share the same frozen string keys between all rows.

Please verify: in the implementation of Hash::[], are strings the only object that is dup'd, or should other types be frozen so they aren't copied for each row too?


Files

csv-freeze-headers.patch (1.33 KB) csv-freeze-headers.patch avit (Andrew Vit), 11/23/2013 05:05 AM
csv-freeze-headers-2.patch (2.1 KB) csv-freeze-headers-2.patch avit (Andrew Vit), 11/24/2013 08:35 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0