• Chris Toshok's avatar
    reduce mallocs by using llvm::SmallVector in a lot of hot paths · 584e85e4
    Chris Toshok authored
    There were a lot of std::vectors in the rewriter and in the invoke
    machinery (callFunc and friends), and every std::vector usage involves
    a call to malloc (and free when is destroyed.)  we should be using
    llvm::SmallVector wherever we can in performance sensitive code, since it
    allows a configurable stack allocated buffer.  It reverts to malloc/free
    if you blow the buffer's capacity, but as long as things are tuned well,
    we can get a pretty significant speedup.
    
    There is more work to be done, but this change gets us ~3% on geomean.
    584e85e4
objmodel.cpp 153 KB