Preston Briggs
2012-Apr-05 01:46 UTC
[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
I wrote:>> private: >> Value *source, *destination; >> Kind kind; >> SmallVector<const Level *, 4> levels;> I'd malloc an ordinary vector of the appropriate length, > since we know the length at allocation time.and Duncan Sands replied:> if the number of levels is usually small it is usually better to use a > SmallVector (like in the code above) and do: > levels.reserve(known_size); > That way you avoid a malloc if known_size <= 4.Surely faster, but what about the space impact, especially if the size is 0 or 1? Do we care? I have several ideas to save space, but there's almost always a time cost. I worry, being afraid we'll need to represent many, many dependences. Thanks, Preston
Apparently Analagous Threads
- [LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
- [LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
- [LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
- [LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
- [LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch