3 ms·Also cache matters a lot. If n is small an array is always faster by a big margin.by adhoc32 4y agoAlso cache matters a lot. If n is small an array is always faster by a big margin.deleted 4y ago[deleted]