Visvalingam optimizations, 9x speed boost!!!