[Marble-devel] Review Request: Minor speed-up: do not carry out multiplications inside the inner loop.

Simon Edwards simon at simonzone.com
Tue Jan 26 07:47:58 CET 2010


>> The reason you don't see any impact is because the bottleneck is somewhere else

There was an interesting video put up on the web recently. It's a 
presentation about how modern CPUs work and what impacts their performance:


It's directly relevant to this discussion, and there are two lessons to 
learn from the presentation:

1) Memory access is the only thing that matters with regards to speed. 
Arithmetic is basically free.

2) Optimisation without proper benchmarking is just random guesswork.

The patch looks like it is just copied data around memory. Personally, I 
would just choose the patch which is easiest to read and understand.

my 2c.


Simon Edwards             | KDE-NL, Guidance tools, Guarddog Firewall
simon at simonzone.com       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."

More information about the Marble-devel mailing list