HomePhorge

whit: cache the `to_s` result.
e70273b342e1Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

whit: cache the to_s result.

This saves about 1.6MB of generated memory, something on the order of 10,000
object allocations and garbage collections, and a whole lot of waste in my
test system.

This runs at, like, O(50n), so while it is just linear it is still a huge
constant factor through the system.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU9099a42d9514: zaml: don't sort object attributes for output
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUe70273b342e1: whit: cache the `to_s` result. (authored by Daniel Pittman <daniel@puppetlabs.com>).Sep 18 2012, 3:12 AM