-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-Codegen-AOT-monoblocking-releasetenet-performancePerformance related issuePerformance related issuetenet-performance-benchmarksIssue from performance benchmarkIssue from performance benchmark
Milestone
Description
The performance of Span's IndexOf got worse with #73768 on wasm.
Visible in dotnet/perf-autofiling-issues#7981, dotnet/perf-autofiling-issues#7976 and here:

I think what is happening is that after the change we end up calling a shared generic method in the span helper, instead of an inflated one.
Stack trace before:
$corlib_System_SpanHelpers_IndexOf_byte__byte_int (dotnet.wasm:0x64acc)
$Wasm_Browser_Bench_Sample_Sample_SpanTask_IndexOfByte_RunStep (dotnet.wasm:0x4bddf0)
invoke_vii (dotnet.js:7557)
$Wasm_Browser_Bench_Sample_BenchTask_Measurement__RunBatchd__13_MoveNext (dotnet.wasm:0x4c0162)
...
after:
$corlib_System_SpanHelpers_IndexOfValueType_TValue_BYTE_TNegator_INST_TValue_BYTE__TValue_BYTE_int (dotnet.wasm:0x66aca)
$Wasm_Browser_Bench_Sample_Sample_SpanTask_IndexOfByte_RunStep (dotnet.wasm:0x4f9be2)
invoke_vii (dotnet.js:7557)
$Wasm_Browser_Bench_Sample_BenchTask_Measurement__RunBatchd__13_MoveNext (dotnet.wasm:0x4fbf53)
...
Metadata
Metadata
Assignees
Labels
area-Codegen-AOT-monoblocking-releasetenet-performancePerformance related issuePerformance related issuetenet-performance-benchmarksIssue from performance benchmarkIssue from performance benchmark