Optimized vector class