Skip to content
Snippets Groups Projects
Commit a26ce96e authored by Enrico Guiraud's avatar Enrico Guiraud
Browse files

[DF] Reduce Define jitting times

In my (very artificial) benchmark, I see a 15% reduction in jitting
time thanks to this change.
parent 7d546259
No related branches found
No related tags found
No related merge requests found
...@@ -373,8 +373,9 @@ void JitDefineHelper(F &&f, const ColumnNames_t &cols, std::string_view name, RL ...@@ -373,8 +373,9 @@ void JitDefineHelper(F &&f, const ColumnNames_t &cols, std::string_view name, RL
// share data after it has lazily compiled the code. Here the data has been used and the memory can be freed. // share data after it has lazily compiled the code. Here the data has been used and the memory can be freed.
delete customColumns; delete customColumns;
// use unique_ptr<RCustomColumnBase> instead of make_unique<NewCol_t> to reduce jit/compile-times
jittedCustomCol.SetCustomColumn( jittedCustomCol.SetCustomColumn(
std::make_unique<NewCol_t>(lm, name, std::move(f), cols, lm->GetNSlots(), newColumns)); std::unique_ptr<RCustomColumnBase>(new NewCol_t(lm, name, std::move(f), cols, lm->GetNSlots(), newColumns)));
} }
/// Convenience function invoked by jitted code to build action nodes at runtime /// Convenience function invoked by jitted code to build action nodes at runtime
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment