Which one was faster? Your version or the original?

I realized that one simple assignment operation can make it significantly slower.