Tweaking for Speed

on Thu, Nov 20, 2008 in development

My “secret project” depends on machining a number of small objects at very high accuracy. Because of this I’ve been having out-of-memory problems on my development laptop; this required digging back into some of the deeper guts of MeshCAM that have been untouched for a while. I found three relatively simple optimizations, maybe 20-30 lines of code, that collectively lead to significant speed increases.

Below are the before and after results of my new speed test script that automates this type of testing. The speed test calculates a parallel finish toolpath on the standard “cheese whiz” model 5 times and averages the results. The 30% reduction may or may not be typical but all finishing toolpaths should benefit.

Memory use should also be reduced somewhat during toolpath calculation.

image image

UPDATE: Ok, maybe not 30%. I found a bug that required me to give back part of that optimization. Count on something more like 15%.

UPDATE TO THE UPDATE: Ok, maybe better than 30%. I found another place to shave off some time and I exceeded the count above. The new best time is about 10 seconds so the current improvement is about 36%. Let’s hope I don’t find any new bugs that make be have to give that up.

Recent Posts