[all-commits] [llvm/llvm-project] 109173: Avoid many std::tie/tuple instantiations in ASTImp...
Reid Kleckner via All-commits
all-commits at lists.llvm.org
Tue Feb 4 15:32:04 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1091730f5fbb13c36e4099e765178c2d8fb7ba0c
https://github.com/llvm/llvm-project/commit/1091730f5fbb13c36e4099e765178c2d8fb7ba0c
Author: Reid Kleckner <rnk at google.com>
Date: 2020-02-04 (Tue, 04 Feb 2020)
Changed paths:
M clang/lib/AST/ASTImporter.cpp
Log Message:
-----------
Avoid many std::tie/tuple instantiations in ASTImporter
To factor the error checking, use importChecked instead of importSeq.
This avoids repeating the names of all of the imported child nodes once,
and allows errors to be checked with a single conditional as it is with
importSeq.
After:
peak memory: 601.63MB
real: 0m19.172s
obj size: 8,352kb
Before:
peak memory: 954.11MB
real: 0m26.188s
obj size: 10,000kb
The speed is not as impressive as I hoped, but the memory use reduction
is impressive, and seems worth it.
Reviewed By: martong, shafik
Differential Revision: https://reviews.llvm.org/D73675
More information about the All-commits
mailing list