zixu-w wrote: Also tested `std::unordered_map`. Here are the updated full results:
For the constructed test input: | Peak memory usage (single parse) | Duration (parsing 100 times) | -- | -- | -- Original `DenseMap` | 3675108832 bytes (3.42 GB) | 53637 ms `DenseMap` with 8 initial buckets | 987108832 bytes (941.38 MB) | 21564 ms `DenseMap` of `std::unique_ptr<Value>`, 8 buckets | 635108832 bytes (605.77 MB) | 20331 ms `std::map` | 203108832 bytes (193.70 MB) | 11667 ms `std::unordered_map` | 252663248 bytes (240.96 MB) | 14107 ms For the compilation database: | Peak memory usage (single parse) | Duration (parsing 100 times) -- | -- | -- Original `DenseMap` | 53176128 bytes (50.71 MB) | 4640 ms `DenseMap` with 8 initial buckets | 38628672 bytes (36.84 MB) | 4447 ms `DenseMap` of `std::unique_ptr<Value>`, 8 buckets | 37243200 bytes (35.52 MB) | 4474 ms `std::map` | 36204096 bytes (34.53 MB) | 4427 ms `std::unordered_map` | 36769296 bytes (35.07 MB) | 4527 ms https://github.com/llvm/llvm-project/pull/171230 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
