You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InputSpan usage of std::function causes an avalanche of template
instantiantions, resulting (at least) in a rather large slowdown
of Framework/Core compilation. With this patch we go from
Compilation (452 times):
Parsing (frontend): 1686.8 s
Codegen & opts (backend): 1120.7 s
to
Compilation (452 times):
Parsing (frontend): 1441.4 s
Codegen & opts (backend): 842.8 s
: schema{std::move(sch)}, partsRef{std::move(pref)}, messages{std::move(msg)}, record{schema, {[this](size_t i, size_t part) { // getter for the DataRef of a part in the input "i"
21
-
auto ref = this->partsRef[i].first + (part << 1); // entry of the header for this part, the payload follows
22
-
auto header = static_cast<charconst*>(this->messages[ref]->data());
23
-
auto payload = static_cast<charconst*>(this->messages[ref + 1]->data());
24
-
return o2f::DataRef{nullptr, header, payload};
25
-
},
26
-
[this](size_t i) { // getter for the nparts in the input "i"
27
-
return i < partsRef.size() ? partsRef[i].second : 0;
28
-
},
29
-
this->partsRef.size()}}
20
+
: schema{std::move(sch)},
21
+
partsRef{std::move(pref)},
22
+
messages{std::move(msg)},
23
+
span{[this](size_t i, size_t part) { // getter for the DataRef of a part in the input "i"
24
+
auto ref = this->partsRef[i].first + (part << 1); // entry of the header for this part, the payload follows
25
+
auto header = static_cast<charconst*>(this->messages[ref]->data());
26
+
auto payload = static_cast<charconst*>(this->messages[ref + 1]->data());
27
+
return o2f::DataRef{nullptr, header, payload};
28
+
},
29
+
[this](size_t i) { // getter for the nparts in the input "i"
30
+
return i < partsRef.size() ? partsRef[i].second : 0;
0 commit comments