HomePhorge

(perf) freeze all string tokens at the source (in the lexer)
2a9e996f12fbUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(perf) freeze all string tokens at the source (in the lexer)

This freezes all strings that are returned as tokens (varname,
sq and dq string, name, classref). Keywords were already frozen.

This optimizations means that these strings does not have to be frozen
later, and the values are faster to use as hash lookup without incurring
the penalty of again freezing (~10us per freeze call).

+ it is a sane thing to do anyway to avoid someone modifying the
strings.

Details

Provenance
Henrik Lindberg <henrik.lindberg@cloudsmith.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU97660e8dd136: (PUP-2860) Remove future parser's old lexer
Branches
Unknown
Tags
Unknown

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPU2a9e996f12fb: (perf) freeze all string tokens at the source (in the lexer) (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Jul 27 2014, 5:03 PM