Skip to content
Commit 020713e3 authored by Douglas Gregor's avatar Douglas Gregor
Browse files

Replace DeclContext's vector of ScopedDecl pointers with a linked list

of ScopedDecls (using the new ScopedDecl::NextDeclInScope
pointer). Performance-wise:

  - It's a net win in memory utilization, since DeclContext is now one
    pointer smaller than it used to be (std::vectors are typically 3
    pointers; we now use 2 pointers) and 
  - Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
    is about 1.9% faster than before, most likely because we no longer
    have the memory allocations and copying associated with the
    std::vector.

I'll re-enable serialization of DeclContexts once I've sorted out the
NextDeclarator/NextDeclInScope question.

llvm-svn: 62001
parent 06b9ee56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment