A single .md file with tips & tricks for high-performance .NET/C# code, mostly meant for AI, and mostly aimed at benchmarks against the crustaceans 🙃 github.com/EgorBo/BlazingFas… (no unsafe!)
Contributions welcome if anything's missing, cc @axeng200@ben_a_adams
Opened a small PR to make LLVM use SIMD for fixed-length memcmp calls on arm64. Current codegen is a bit suboptimal: godbolt.org/z/9crqbxo4v (up to 2x slower than SIMD)
Not sure it'll get reviewed amid the flood of contributions, though 😅 PR: github.com/llvm/llvm-project…
Added a bonus prompt to check a library for safety issues before adding it as a dependency: github.com/EgorBo/BlazingFas…
If it flags lots of issues in yet another blazing-fast lib full of unsafe code, consider a safer alternative 😐
77 open PRs for the JIT compiler from non-team members. Obviously all fully AI-generated. Every interaction is just me talking to someone else's Claude or Copilot).
I've benchmarked many models for my "AI bug hunting" script. Here's the latest run with (incl. Gemini 4 Argon). My favorite combo so far is 6.1 Sol + Sonnet 5.5. Sonnet 5.5 seems to need at least xhigh reasoning to shine - but that puts it in Opus territory pricewise.
GPT + Opus (via Copilot CLI) helped me uncover 180 JIT bugs, each with a minimal C# repro using only safe code 😶 - most had been hiding from us for many releases github.com/dotnet/runtime/is…
It took $15 worth of tokens + Reverse Anything to extract Heroes III's battlefield and port it to the web. Crazy what's possible now. Pandora's box has been opened.
(Deleted my prev. post JIC) .NET devs should really stop introducing blazing fast (de)serializers 🙂. The world is going through a period when anyone using e.g. GLM5.3 can easily find and exploit a memory safety issue - many projects are overwhelmed by 1000s of potential CVE reports, though not everyone chooses to report what they find. Deserializers often accept untrusted input from external sources, making them prime targets for attacks. Embrace safety over saving a few nanoseconds and fewer heap allocations.
On larger switches, both C# and Rust emit a Trie: godbolt.org/z/hcxWeMzjq
C# strings are utf16 vs utf8, so more instructions + for each case C# emits a fast path (is it the same string literal? = frozen object).