Re: Dependencies

Date: 2012-07-23 11:28 pm (UTC)
tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
From: [personal profile] tim
Yeah, I wasn't even considering caching ASTs; I thought that would be pointless, since at least right now, the bottleneck is in trans and LLVM.

I think I can do a lot of the work (like simply computing the dependency graph) without deciding whether the eventual goal is to cache bitcode or object code, so I'm ok with postponing that decision for a while.

Caching compiled code will, I would guess, be the most complex and result in slower executables since LLVM will not be optimizing the whole crate as a unit, though if we're doing a non-optimizing build that's obviously fine.

Maybe there are some heuristics that can be applied here? Like "for a one-line source change, don't bother to recompile the whole crate; for larger changes, maybe it won't lose much time to just recompile everything and then we'll get the benefit of optimization."

One other comment on items vs files: in general, rustc quickly forgets the file from which code originated, so I actually think doing the caching at the level of items or modules will be the easiest.

That's good to know... items makes more sense to me, but I didn't know if the bookkeeping was likely to become too complex or not.
This account has disabled anonymous posting.
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

November 2021

S M T W T F S
 123456
78 910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags