It should be obvious that for high performance you should avoid many add()
operations for sequences. add() is a not trivial proc call, even when inlined
it has to check if buffer is full and needs reallocation, and it has to
increase len field. What was not that obvious for me is how much slower add()
is compared to a plain assignment using index operator []. I think time was a
factor 8, and that is similar for C++ std::vector. The other masking operations
are often well optimized by C compiler, but you should inspect the ASM code.