bytecodealliance / bytecodealliance/wit-bindgen

C#: Consider using `Unsafe` instead of `BitConverter` to convert values to/from bytes

Open
#1,014 0 comments 0 reactions 0 assignees View on GitHub
gen-c#
Dominant language
Rust
Stars
1.5k
Forks
286
Avg merge
6h 32m
Merged PRs (30d)
19

Description

Per https://github.com/dotnet/runtimelab/pull/2614#discussion_r1700019060, `Unsafe.Write` and `Unsafe.As` might be more efficient than `BitConverter.TryWriteBytes` and `BitConverter.To*`, respectively.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.