On Wed, 18 Feb 2009 03:45:56 +0100, Alan Grimes <agri...@speakeasy.net> wrote:
> Take my advice, don't get started on profiling and optimization unless > you have several days worth of time to waste. =P But don't forget: "The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson" ( http://en.wikipedia.org/wiki/Optimization_(computer_science)#Quotes ) In my opinion the most important quality of the code is to be easily (1) maintainable, (2) reliable and (3) fast. So don't optimize if (1) and (2) are not fulfilled. > > The biggest CPU sucker in ktechlab is the linear algebra engine. The > reason it gets called so much is that non-linear things such as > transistors need to iterate in order to converge on their instantaneous > DC conditions... I found several ways to reduce the number of times > QMatrix[] is called... What about allowing to user to tune / relax convergence error conditions. Precision vs CPU time balance? :) > GCC doesn't seem to be inlining it, that could > also be a fairly substantial boost. The biggest gain was to convert a > copy (double) loop into a memcpy, that was a very substantial gain! For debug builds, I'd have let there that loops. But still.. was that copy operation needed at all? :P ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Ktechlab-devel mailing list Ktechlab-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ktechlab-devel