Basis trait now uses internal iterators to avoid allocations.