Wafer
Wafer copied to clipboard
Investigate DVec
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).