llvm-project/llvm/lib/AsmParser
Chris Lattner 7289e62874 It turns out that the two dimensional vectors were causing big slowdowns
in this for programs with lots of types (like the testcase in PR224).
The problem was that the type ID that the outer vector was using was not
very dense (as many types are getting resolved), so the vector is large
and gets reallocated a lot.

Since there are a lot of values in the program (the .ll file is 10M),
each reallocation has to copy the subvectors, which is also quite slow
(this wouldn't be a problem if C++ supported move semantics, but it
doesn't, at least not yet :(

Changing the outer data structure to a map speeds a release build of
llvm-as up from 11.21s to 5.13s on the testcase in PR224.

llvm-svn: 11244
2004-02-09 21:03:38 +00:00
..
.cvsignore Ignore generated files Lexer.cpp and llvmAsmParser.* 2002-12-02 21:14:54 +00:00
Lexer.l Change the 'exception' destination to the 'unwind' destination. We will always 2004-02-08 21:48:25 +00:00
Makefile Added LLVM copyright notice to Makefiles. 2003-10-20 22:26:57 +00:00
Parser.cpp Put all LLVM code into the llvm namespace, as per bug 109. 2003-11-11 22:41:34 +00:00
ParserInternals.h Minor cleanups, plug a minor memory leak 2003-12-23 20:05:15 +00:00
llvmAsmParser.y It turns out that the two dimensional vectors were causing big slowdowns 2004-02-09 21:03:38 +00:00