HackerTrans
TopNewTrendsCommentsPastAskShowJobs

ibraheemdev

no profile record

Submissions

Astral to Join OpenAI

astral.sh
1,489 points·by ibraheemdev·قبل 4 أشهر·901 comments

Cuckoo hashing improves SIMD hash tables (and other hash table tradeoffs)

reiner.org
79 points·by ibraheemdev·قبل 9 أشهر·1 comments

comments

ibraheemdev
·قبل 3 أشهر·discuss
Not the runtime per se, but cooperative scheduling has the advantage that tasks do not yield at adverse code points, e.g., right before giving up a lock, or performing an I/O request. Of course the lack of preemption has it's own downsides, but with thread-per-request you tend to run into tail latency issues much earlier than context switching overhead.
ibraheemdev
·قبل 3 أشهر·discuss
> OS threads are expensive: an operating system thread typically reserves a megabyte of stack space

Why is reserving a megabyte of stack space "expensive"?

> and takes roughly a millisecond to create

I'm not sure where this number is from, it seems off by a few orders of magnitude. On Linux, thread creation is closer to 10 microseconds.
ibraheemdev
·قبل 10 أشهر·discuss
It does make a difference of course if you're running fetch_max from multiple threads, adding a load fast-path introduces a race condition.
ibraheemdev
·قبل 10 أشهر·discuss
pip, PDM, and uv already support PEP751 [0] and were involved in the design process.

[0]: https://discuss.python.org/t/community-adoption-of-pylock-to...