Performance improvement for miesmuschel, mlr3pipelines and possibly others.
Whenever the $params active binding is called, ParamSetCollection (PSC) creates a clone of every Param that it contains. This is only done because the Param's $id, when returned from a PSC, is different from when returned from its sub-ParamSets. However, the $id slot is hardly ever used, so we can avoid a lot of cloning if there is a "$params-but-without-the-id" active binding that can be used instead. This active binding would just return the uncloned Params.
Since $params gets accessed quite a lot this can make quite some difference, more than a factor of 2 for miesmuschel in some cases.
I plan to add some documentation about how params_unid is for internal use mostly. Would be happy about other comments.
Performance improvement for miesmuschel, mlr3pipelines and possibly others.
Whenever the
$params
active binding is called, ParamSetCollection (PSC) creates a clone of everyParam
that it contains. This is only done because theParam
's$id
, when returned from a PSC, is different from when returned from its sub-ParamSets. However, the$id
slot is hardly ever used, so we can avoid a lot of cloning if there is a "$params
-but-without-the-id" active binding that can be used instead. This active binding would just return the unclonedParam
s.Since
$params
gets accessed quite a lot this can make quite some difference, more than a factor of 2 for miesmuschel in some cases.I plan to add some documentation about how
params_unid
is for internal use mostly. Would be happy about other comments.