Lower initial dict/set size from 64->8
By switching to our DenseMap/Set fork with that allows parameterizing on this. This is the same number that CPython uses. We were previously using llvm's default of 64, which is pretty high -- probably fine for their use cases, but in Python programs with lots of sets/dicts we spend a lot of time doing malloc() for all those 1kB+ allocations. This also increases the time it takes to iterate over the dict/set, since there are more empty buckets that have to be read + skipped.
Showing
Please register or sign in to comment