The main difference then between a Vec and a DVec lies not in the operations it offers, but in how much they cost. That is, when you push on a standard Vec, it is an O(1) operation. But when you clone, that is O(n). For a DVec, those costs are sort of inverted: pushing is O(log n), but cloning is O(1).
dogged
The main difference then between a
Vec
and aDVec
lies not in the operations it offers, but in how much they cost. That is, when you push on a standardVec
, it is an O(1) operation. But when you clone, that is O(n). For aDVec
, those costs are sort of inverted: pushing is O(log n), but cloning is O(1).