Libbum / Wafer

Parallelized 3D FDTD Schrödinger Equation Solver
MIT License
21 stars 2 forks source link

Investigate DVec #50

Open Libbum opened 6 years ago

Libbum commented 6 years ago

dogged

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).