Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Perf regression of Span.IndexOf #75709

Closed
radekdoulik opened this issue Sep 15, 2022 · 5 comments · Fixed by #75917
Closed

[wasm] Perf regression of Span.IndexOf #75709

radekdoulik opened this issue Sep 15, 2022 · 5 comments · Fixed by #75917
Assignees
Labels
Milestone

Comments

@radekdoulik
Copy link
Member

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:
image

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)
...
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 15, 2022
@radekdoulik radekdoulik added area-Codegen-AOT-mono and removed untriaged New issue has not been triaged by the area owner labels Sep 15, 2022
@radekdoulik radekdoulik added this to the 8.0.0 milestone Sep 15, 2022
@lewing
Copy link
Member

lewing commented Sep 16, 2022

discussion happening at #74395

@vargaz
Copy link
Contributor

vargaz commented Sep 17, 2022

One possible cause:
#75801

@jeffhandley jeffhandley modified the milestones: 8.0.0, 7.0.0 Sep 20, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 20, 2022
@jeffhandley jeffhandley added blocking-release tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark labels Sep 20, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Sep 22, 2022
@stephentoub
Copy link
Member

Reopening to track 7.0 fix

@marek-safar
Copy link
Contributor

Closing as the 7.0 fix was merged

@ghost ghost locked as resolved and limited conversation to collaborators Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants