Memory reallocation with Vec
kills performance
#1657
Labels
[C] Bug
This is a bug. Something isn't working.
[E] Performance
Track performance improvement (Time / Memory / CPU)
T-CBMC
Issue related to an existing CBMC issue
This example is from #1651, implemented using a vector:
with Kani version: d53296a
When the vector is created with
Vec::with_capacity
to pre-allocate memory, verification time is 3.2 seconds, and consumes less than 1 GB of memory. But when usingVec::new()
, verification takes 160 seconds, and consumes more than 14 GB of memory.If I bump
N
to 5 (and the unwind value to 7), theVec::with_capacity
version finishes in 7 seconds, and consumes less than 1 GB, and theVec::new
version runs out of memory (>32 GB) after running for about 3 minutes.The text was updated successfully, but these errors were encountered: