EgorBo (@EgorBo) header
EgorBo (@EgorBo) profile picture

Principal Engineer at Microsoft

Warsaw, Poland
Joined November 2010
Pinned Tweet
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
16
66
398
18,983
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…
4
1
1
98
8,259
.NET does the right thing already:
2
28
1,400
C# is 4th in open source contributions (behind typescript, python, javascript) #dotnet github.blog/news-insights/oc…
3
18
2
160
7,996
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 😐
1
3
1
26
2,328
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).
17
1
1
96
6,304
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.
6
20
2,726
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.
1
20
1,057
Well, I guess I'm not allowed to ask🫤
2
10
1,523
(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.
8
9
6
86
27,235
Yet another shiny new model scored 0.00% on the "Can I actually use it?" benchmark :\
2
1
7
1,494
Как перевести C# union на русский язык при помощи автоперевода learn.microsoft.com/ru-ru/do… 🤔
6
3
33
2,229
net11 rc1 is out, the end of a safe-unsafe era! (along with ~300-400 other APIs annotated as unsafe). For now, opt-in.
2
3
1
70
5,363
Decided to check C# (it also emits a Trie for pattern matches like that) - it turned out it needed a little help on the Roslyn side for this case, filed github.com/dotnet/roslyn/pul… 🙃
This is by the way one of the reasons why the code you write in C without thinking going to be slower than rust:
2
53
10,078
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).
2
1,330
Unions in C# vs alternative. Hint: both suggestions have memory model issues making them unsafe (at least the 2nd one, 1st one is arguably too).
4
33
4,045
C# 15.0:
modern java (top) rust (bottom) the java you thought you knew is no more
12
17
2
313
35,376
In the AI era, a good language platform needs a rich standard library out of the box. You shouldn't need 3rd-party packages for basic things like pad-left/arrayref. Every micro-dependency is just another entry point for a supply chain attack.
1
2
18
1,322