Files
qt-creator/tests/manual/layoutbuilder/v2/README.md
hjk 41046c0d44 LayoutBuilder: Initialize BuilderItem::apply more directly
Also, add some timing information.

Change-Id: I5d38cac9e7ad0afb24504ff521f31d5202268462
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-07-18 09:59:01 +00:00

38 lines
650 B
Markdown

This is an ad-hoc instruction count to judge the overhead imposed
by Layoutbuilder for
Label ll {
text("World")
};
(1) up to Label::Label
(2) after new Label to up to doit()
(3) tuple stuff in doit up to QLabel::setText parameter construction
With
BuilderItem(IdAndArg<Id, Arg> && idarg)
{
apply = [&idarg](X *x) { doit(x, Id{}, idarg.arg); };
}
(1) (2) + (3) Sum
-O0 547 259 + 802 1608
-O2 24 23 47
With
BuilderItem(IdAndArg<Id, Arg> && idarg)
: apply([&idarg](X *x) { doit(x, Id{}, idarg.arg); })
{}
(1) (2) + (3) Sum
-O2 5 23 28