about summary refs log tree commit diff
path: root/src/rt/jemalloc/test/aligned_alloc.exp
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2013-05-25 17:45:45 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2013-05-25 17:57:22 +0200
commit6c62d77830d75c5bbc9f546f944c038be2622a8b (patch)
tree34bd1e833ec112b7a20ee54605214e3860ac336a /src/rt/jemalloc/test/aligned_alloc.exp
parentb238a0872507293b2650f6d225ef94071bd53f54 (diff)
downloadrust-6c62d77830d75c5bbc9f546f944c038be2622a8b.tar.gz
rust-6c62d77830d75c5bbc9f546f944c038be2622a8b.zip
Use an enum for keywords and intern them to improve parser performance
Currently, keywords are stored in hashsets that are recreated for every
Parser instance, which is quite expensive since macro expansion creates
lots of them. Additionally, the parser functions that look for a keyword
currently accept a string and have a runtime check to validate that they
actually received a keyword.

By creating an enum for the keywords and inserting them into the
ident interner, we can avoid the creation of the hashsets and get static
checks for the keywords.

For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
Diffstat (limited to 'src/rt/jemalloc/test/aligned_alloc.exp')
0 files changed, 0 insertions, 0 deletions