On Tue, Sep 7, 2010 at 08:15, Daniel Stonier
<d.stonier@xxxxxxxxx> wrote:
Hi lads,
I've been trying to benchmark eigen2 and eigen3's geometry modules
recently just to get an idea of the speed we can run various
structures at, but I'm having a hard time getting consistent results
and thought you might be able to lend some advice.
Typically, I do things in the following order on a linux platform with
rt timers (ie clock_gettime(CLOCK_MONOTONIC,...))
###########################################
set the process as a real time priority posix process
select transform type
begin_loop
- fill transform with random data
- timestamp
- do a transform product
- timestamp again
- push time diff onto a queue
repeat
do some statistics
###########################################
The times I have coming out are extremely inconsistent though:
- if repeating only 100 times, the product might come out with times
of ~840-846ns one run, then sometimes 300-310ns on another run.
- if repeating 10000 times, it will run at ~840ns for a long time,
then jump down and run at 300-310ns for the remainder.
- running other tests in the loop as well (taking separate timestamps
and using multiple queues) can cause the calculation time to be very
different.
- e.g. this test alone produces results of ~600ns, mingled with
other tests it is usually ~840ns.
Some troubleshooting:
- it is not effects from multi-core as the same problems happen when
using taskset to lock it onto a single core.
- it shouldn't be from the scheduler either because it is an elevated
posix real time process.
I'm baffled. Would really love to know more about how my computer
processes in such a humanly erratic fashion and what's a good way of
testing that.
Cheers,
Daniel Stonier.
--
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/
Yujin Robot: http://www.yujinrobot.com/
Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl