Skip to content

Collect simple binary operands without general traversal - #673

Open
jogibear9988 wants to merge 1 commit into
dadhi:masterfrom
jogibear9988:fix/terminal-binary-collection-20261114
Open

jogibear9988 wants to merge 1 commit into
dadhi:masterfrom
jogibear9988:fix/terminal-binary-collection-20261114

Conversation

@jogibear9988

Copy link
Copy Markdown
Contributor

Collect terminal operands of non-short-circuit arithmetic/comparison roots directly. Preserve left-to-right failure, constant closure binding and intrinsic/nonterminal fallback; assignments and short-circuit operators retain their existing collection.

Tests cover boxed reference identity, undefined parameters and exception-containing fallback operands.

Validation

Full Release solution build and Standard/LightExpression native runners pass for net8.0, net10.0 and net472. net8.0: 690 TestX and 1744 legacy cases; net10.0: 690 TestX and 1745 legacy cases; net472: 671 TestX and 1610 legacy cases.

Measurements

FEC on master da14580f10fd19ae2361a8e91cfad4b2dfec182a → this change e38af0f64dcf415cb219b7916622be7061ef0a9f. Windows ARM64; .NET 8.0.28 and 10.0.9; SDK 10.0.301.

Trees, API conversions and invocation adapters are built before measurement. Compilation includes delegate creation; runtime measures the compiled delegate through the same adapter. Both sides are FEC: “System trees” names the expression API, not the System compiler.

Two opposite-load-order process rounds; seven alternating paired samples per round; medians of 14 samples, 100 ms calibration target. Verified task-local runtimes; tiered compilation disabled; each process pinned to one logical CPU. Allocations use GC.GetAllocatedBytesForCurrentThread. Slower observations are retained. Timing variation, including unchanged IL controls, prevents a blanket speedup or no-regression claim.

Runtime / API Workload Compile μs, master → patch Compile B/op Runtime ns, master → patch Runtime B/op
net10.0 / LightExpression constructor_arguments 12.387 → 13.095 904.0 64.333 → 76.006 32.0
net10.0 / LightExpression member_arithmetic 129.850 → 131.648 3192.4 12.662 → 14.945 0.0
net10.0 / LightExpression nested_lambda 59.840 → 64.222 2048.1 14.320 → 10.699 0.0
net10.0 / LightExpression scalar_add 21.511 → 20.107 872.1 7.559 → 8.594 0.0
net10.0 / System trees constructor_arguments 22.385 → 29.043 944.2 50.220 → 70.797 32.0
net10.0 / System trees member_arithmetic 135.222 → 154.280 3200.0 9.426 → 12.737 0.0
net10.0 / System trees nested_lambda 39.800 → 38.315 2048.1 7.675 → 8.063 0.0
net10.0 / System trees scalar_add 13.503 → 22.993 872.0 6.989 → 6.382 0.0
net8.0 / LightExpression constructor_arguments 12.895 → 10.931 904.0 75.215 → 34.836 32.0
net8.0 / LightExpression member_arithmetic 79.430 → 90.607 3192.3 10.298 → 9.716 0.0
net8.0 / LightExpression nested_lambda 30.879 → 34.859 2048.1 7.853 → 7.956 0.0
net8.0 / LightExpression scalar_add 11.201 → 11.029 872.0 7.625 → 7.996 0.0
net8.0 / System trees constructor_arguments 33.298 → 33.863 944.2 119.914 → 88.093 32.0
net8.0 / System trees member_arithmetic 185.127 → 232.715 3194.0 12.969 → 13.144 0.0
net8.0 / System trees nested_lambda 39.492 → 30.659 2048.1 7.951 → 7.435 0.0
net8.0 / System trees scalar_add 10.704 → 11.960 872.0 6.961 → 6.851 0.0

Shared-workload emitted IL is unchanged.

Allocation changes: none beyond measurement rounding in these shared workloads.

Collect terminal operands of non-short-circuit arithmetic/comparison roots directly. Preserve left-to-right failure, constant closure binding and intrinsic/nonterminal fallback; assignments and short-circuit operators retain their existing collection.

Tests cover boxed reference identity, undefined parameters and exception-containing fallback operands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant