HomePhorge

Use `intern` rather than `symbolize` it Puppet::Type
fbd510560197Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Use intern rather than symbolize it Puppet::Type

The cost of symbolize is ~ 50 percent higher than the cost of intern, when
applied to either a string or a symbol. Given this is called some 90,000
times in my real world test run, that adds up to a non-zero amount of
wasted time.

Sadly, this only works out at 0.15 seconds real time reduction, but it is
better than nothing - and takes out 85,000 extra calls.

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
rPUc0e5f4df37de: Implement Symbol#intern when it is missing.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUfbd510560197: Use `intern` rather than `symbolize` it Puppet::Type (authored by Daniel Pittman <daniel@puppetlabs.com>).Sep 18 2012, 12:12 AM