Slightly different implementation, MUCH faster!