I think sequences are designed for general purpose, not for ultimate speed. And 
due to the additional complexity (that the size can change), it cannot be as 
fast as arrays. For example, it has boundary checks. To perform such a check, 
the program has to first load its _current_ length and then compare it with the 
index. Arrays also have this check, but their lengths can't change. Try 
compiling with `--boundChecks:off`. Also try `--opt:speed --mm:orc`. Sometimes 
these options also matter.

As for `std::vector`, try using the C++ iterator (the internal pointer) instead 
of indices.

Also `.unsafeAddr[]` is a no-op. It's just `*&` and will likely be optimized 
out, or decrease the speed if not.

Reply via email to