@JakobOvrum no reason to be troubled at all. It's simple counting of primitive operations. The original approach works, but simply does more operations. That would be the case in any language and implementation. The code I've shown is **not** a hand-written equivalent of the original code, but a different approach altogether.