Stream: t-compiler/const-eval

Topic: cache_on_disk


RalfJ (Nov 06 2018 at 09:36, on Zulip):

@Oli I see a new cache_on_disk method for each query... do you think we should use that to not cache const_eval_raw, or some such thing?

RalfJ (Nov 06 2018 at 09:37, on Zulip):

seems like not caching is even the default oO

oli (Nov 06 2018 at 09:37, on Zulip):

;)

RalfJ (Nov 06 2018 at 09:37, on Zulip):

but the const queries both get cached

oli (Nov 06 2018 at 09:37, on Zulip):

huh

oli (Nov 06 2018 at 09:37, on Zulip):

how can you tell?

RalfJ (Nov 06 2018 at 09:38, on Zulip):

because they both have an explicit implementation of that method to return true^^

RalfJ (Nov 06 2018 at 09:38, on Zulip):

looking at librustc/ty/query/config.rs

RalfJ (Nov 06 2018 at 09:38, on Zulip):

(what I really set out to do was change const_eval_raw to return an allocation, not a ConstValue)

oli (Nov 06 2018 at 09:39, on Zulip):

:heart:

oli (Nov 06 2018 at 09:40, on Zulip):

maybe do these things in separate PRs though

oli (Nov 06 2018 at 09:41, on Zulip):

If statics referring to other statics are very common, then not caching const_eval_raw could be bad

oli (Nov 06 2018 at 09:41, on Zulip):

especially for large statics

oli (Nov 06 2018 at 09:42, on Zulip):

What are you trying to achieve by not caching const_eval_raw?

oli (Nov 06 2018 at 09:43, on Zulip):

(note that &'tcx Allocation is already deduplicated, so the memory footprint should be minimal)

RalfJ (Nov 06 2018 at 09:45, on Zulip):

yeah not going to touch the caching here

RalfJ (Nov 06 2018 at 09:45, on Zulip):

What are you trying to achieve by not caching const_eval_raw?

dunno, save space?^^

Last update: Nov 15 2019 at 20:20UTC