From: Dr. J. Z. <joh...@ze...> - 2008-03-09 18:59:17
|
Hello, I just had a look at the thin plate splines code. Apparently, this is pretty slow. 1. Suggestion: I recognized calls like splines_kernel(sqrt(dx*dx + dy*dy)) where splines_kernel(double h) essentially returns h * h * log(h). I'd suggest to rewrite this to splines_kernel(dx*x + dy*dy) where splines_kernel(double h) then returns h * log(h) * 0.5 This saves one sqrt per call and the factor 0.5 could even be moved to outside the sum. 2. Are there any other useful (faster) kernels? E.g. a kernel with no expensive function like log()? Best regards, -- Dr. Johannes Zellner <joh...@ze...> |