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

Fix CRC16 perf regression on .NET 6 #303

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

PaulusParssinen
Copy link
Contributor

@PaulusParssinen PaulusParssinen commented Apr 22, 2024

In #198 I switched the CRC16 table to use RVA statics which as implementation detail places the constant data table to .data section (and does endianness fix-ups for big-endian platforms). However the support non-byte sized primitives in RVA only is supported from .NET 7 onwards which made current code allocate this table on each getter call.. Oops.

This PR restores performance characteristics of the original implementation for .NET 6.

* Non-byte sized RVA statics are only supported from .NET 7 onwards.
@PaulusParssinen PaulusParssinen changed the title Fix CRC16 regression on .NET 6 Fix CRC16 perf regression on .NET 6 Apr 22, 2024
@TedHartMS TedHartMS merged commit 716cfb8 into microsoft:main Apr 22, 2024
21 checks passed
@PaulusParssinen PaulusParssinen deleted the fix-crc16-regression branch April 22, 2024 16:16
@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants