How can I optimize vector normalization in a Molecular Modeling program?

Fine China Blue Porcelain saratoga at myremarq.com
Mon Nov 8 20:32:50 EST 1999


/ Hi, I've been working on a molecular modeling program and have been
/ trying to improve its performance recently.  I did some profiling and
/ found that the most time by far (41.4%) was spent in a function which
/ normalizes a 3-dimensional vector (profiling statistics are given at
/ the bottom).

Normalisation is a real killer in graphics as well, like openGL. You might
try newsgroups along those lines. There's an openGL compatiable library
called Mesa with a source distribution. You might try dissecting that for
ideas.

Instead of computing sqrt(x), you should be able to do 1/sqrt(x) instead
and multiply rather than divide, but you'll lose the lowest one or three
bits of accuracy.

-- 
CACS: Collective Against Consensual Sanity       v0.123
Now a text site map! http://www.angelfire.com/ca3/cacs/
For a free CACS T-shirt send $42 shipping and handling.
pretty?     http://www.geocities.com/SoHo/Studios/5079/




More information about the Molmodel mailing list