Commit Graph

3 Commits

Author SHA1 Message Date
Anthony Latsis
39649161d0 Gardening: See to some missing newline warnings 2021-02-12 17:00:47 +03:00
Slava Pestov
0bfa868978 AST: Per-request dependency maps
Just as with the result cache, instead of a single DenseMap with
type-erased AnyRequest keys, we can use per-request maps for a
nice performance improvement.
2021-01-05 17:56:39 -05:00
Slava Pestov
4dd781d8b4 AST: Per-request caches
This is based on an earlier patch by @hamishknight.

The idea is that instead of caching results in a single DenseMap
that maps AnyRequest to AnyValue, we instead define a separate
DenseMap for each request kind that directly uses the request as
the key, and the request value as the value.

This avoids type erasure and memory allocation overhead arising
from the use of AnyRequest and AnyValue. There are no remaining
usages of AnyValue, and the only usage of AnyRequest is now in
the reference dependency tracking, which can be refactored to use
a similar strategy of storing per-request maps as well.
2021-01-05 17:56:38 -05:00