[Dune] [#564] Use dynamic polymorphism

Dune dune at dune-project.org
Tue Jun 30 20:55:42 CEST 2009


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#564 - Use dynamic polymorphism
User who did this - Oliver Sander (sander)

----------
Thanks for the hint.  Actually I had a crucial type in my timings:  the options I used were -O3 and not -O.  Here's what I get with Robert's options:

Static
2.15213 sec.
With virtual functions, class allocated on the stack
2.13613 sec.
With virtual functions, class allocated on the heap
2.80017 sec.
With virtual functions, class allocated on the heap, access through the base class
2.80417 sec.
--- function call here ---
static, passed by const reference
2.13213 sec.
dynamic, passed by value
2.14813 sec.
dynamic, passed by const reference
2.80017 sec.
dynamic, passed by pointer the the base class
2.80417 sec.

Strangely enough this only results in making the static methods a bit slower...
----------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=564#comment1002

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list