Skip to content
Snippets Groups Projects
Commit 310c3c01 authored by Enrico Guiraud's avatar Enrico Guiraud Committed by Danilo Piparo
Browse files

[TDF] Avoid virtual calls in non-jitted transformations

This is a breaking interface change: Filter now returns templated
TInterface<TFilter<F,P>> objects instead of TInterface<TFilterBase>
as before (and anagolously for Define and Range).
Jitted transformations still return TInterfaces wrapping the base
classes (e.g. TFilterBase).

Filter, Define and Range returned TInterfaces wrapping pointers to the
base classes representing the corresponding nodes. This choice was made
to limit compile time and ease the introduction of jitted transformations.
As a consequence, nodes of the functional graph communicated with each
other through virtual calls.

This commit lets nodes call into each other through the derived (template)
types instead. Given that all nodes' virtual methods are marked `final`,
this should allow compilers to de-virtualize such calls.
parent 538c9472
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment