Ibraheem Ahmed's Avatar

Ibraheem Ahmed

@ibraheem.ca

Software developer interested in building fast, concurrent, and robust systems. @ibraheemdev on twitter.

191
Followers
49
Following
41
Posts
12.09.2023
Joined
Posts Following

Latest posts by Ibraheem Ahmed @ibraheem.ca

It's been really exciting collaborating with the rust-analyzer folks on salsa (which we use internally in ty)! A lot of the improvements end up making their way into both projects, I think salsa has a bright future ahead.

19.06.2025 19:10 πŸ‘ 14 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

I think teaching barriers first would reinforce the "nothing can be reordered past this barrier" idea, instead of the barrier being a way to *upgrade* a subsequent store to release the memory preceding the barrier. Reordering kind of misses the entire point of how atomic synchronization works.

19.06.2025 19:03 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I really dislike the idea of teaching atomic orderings in terms of potential compiler/hardware reordering optimizations. That's not how the spec defines them, and that mental model can get problematic quickly. Atomic orderings prescribe visibility relationships that are actually pretty intuitive.

19.06.2025 03:52 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

Today, we’re announcing the preview release of ty, an extremely fast type checker and language server for Python, written in Rust.

In early testing, it's 10x, 50x, even 100x faster than existing type checkers. (We've seen >600x speed-ups over Mypy in some real-world projects.)

13.05.2025 17:00 πŸ‘ 333 πŸ” 84 πŸ’¬ 14 πŸ“Œ 14

I was recently made aware that every single additional *cycle* in the hash function used by rustc increases its runtime by a whopping 0.25%

14.02.2025 04:46 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
the patch just removes random closing brackets throughout the codebase

the patch just removes random closing brackets throughout the codebase

Very high quality code here too

18.01.2025 02:53 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
an AI generated patch for a bug on github

an AI generated patch for a bug on github

No I don't want AI generated PRs on my repository thank you very much

18.01.2025 02:52 πŸ‘ 13 πŸ” 2 πŸ’¬ 3 πŸ“Œ 0

Unfortunately all of my short blog post ideas evolve into books

08.01.2025 00:55 πŸ‘ 6 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Going to try and publish more than one blog post this year...

08.01.2025 00:55 πŸ‘ 3 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0
Post image
05.01.2025 08:43 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I wonder if the bitmask approach of github.com/cloudflare/t... has any potential here?

25.12.2024 09:11 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

There's a 10us state machine based solution on a local Discord leaderboard πŸ˜„.

02.12.2024 20:34 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

If you go in windows of three you can try cheating once by skipping the middle item, and every iteration after that you compare the last two items in the tuple instead of the first two. Though if you do it this way you need to handle skipping the first and second items as a separate case.

02.12.2024 19:40 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Announcing Nio

Nice to see people experimenting with alternative scheduling algorithms! nurmohammed840.github.io/posts/announ...

24.11.2024 15:59 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I see, does your implementation essentially translate '.' to '/'?

21.11.2024 17:38 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
GitHub - ibraheemdev/astra: Rust web servers without async/await. Rust web servers without async/await. Contribute to ibraheemdev/astra development by creating an account on GitHub.

Libraries like github.com/ibraheemdev/... are probably the best middle ground because it allows people who don't want async to still benefit from the ecosystem. It will be slower but unless someone is willing to write a professional grade synchronous HTTP 1/2/3 implementation, it's your best option.

21.11.2024 17:08 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Async might be a net negative for a lot of people, but unfortunately those people are also less likely to be investing time into maintaining quality infrastructure for synchronous code, so it's kind of of an impossible problem.

21.11.2024 17:04 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I think all the talk about async being hard somewhat misses the point that high-throughput low-latency systems *are* hard, and the people building those systems are also the people developing and maintaining the async ecosystem.

21.11.2024 17:02 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Would this "just work" if matchit supported parameters with static prefixes? e.g. `/{foo}.bar`

I have a work in progress PR that implements this github.com/ibraheemdev/... but it needs some more work for conflict handling

21.11.2024 16:30 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Do I spy matchit's new routing syntax?

21.11.2024 15:29 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I wrote a bit about the design of papaya here: ibraheem.ca/posts/design.... This release will mostly be microoptimizations that contribute to a ~15% performance improvement.

17.11.2024 21:31 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I think there's room for everyone to be more open about async not being the end all and be all of performance.

16.11.2024 20:11 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

There is a little bit of nuance around async being more expensive at lower concurrency and async synchronization primitives being more complex. async-sync interop is not free, and so there is a cost on users forced to use an async library in a synchronous context.

16.11.2024 20:11 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

You missed the "Windows CI is failing though"

16.11.2024 20:03 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Maybe! Though papaya's higher baseline memory usage would be an important consideration.

16.11.2024 19:48 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - ibraheemdev/papaya: A fast and ergonomic concurrent hash-table for read-heavy workloads. A fast and ergonomic concurrent hash-table for read-heavy workloads. - ibraheemdev/papaya

Hoping to release soon.

github.com/ibraheemdev/...

16.11.2024 19:35 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

The next version of papaya reaches over 2x the read throughput of dashmap!

16.11.2024 19:34 πŸ‘ 8 πŸ” 2 πŸ’¬ 3 πŸ“Œ 0

The other part of this is you can't really ignore the other 0.2us measurement, because that implies a huge savings on userspace synchronization (channels, mutexes, etc.)

16.11.2024 05:02 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Exactly. epoll_wait is a user->kernel->user roundtrip just like a blocking recvfrom. If every IO op corresponds to a epoll_wait you're probably worse than blocking IO due to extra regostration syscalls. If 300 IO ops correspond to a given epoll_wait you're down to 1/300th of the expensive roundtrips

16.11.2024 05:00 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

That's why saying that the cost of context switches caused by IO-readiness are equal between async and threads, as the benchmark repository did, is somewhat misleading.

15.11.2024 21:27 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0