I have written a small test case for investigating performance bottlenecks in extendscript environment.
sharpenCorners.js Removes control handles from selected path points. Works same as clicking a point