Toots for shachaf@y.la account

Written by shachaf on 2025-01-05 at 19:59

My sister sent me this puzzle. It's so good!

=> View attached media

=> More informations about this toot | View the thread

Written by shachaf on 2024-11-29 at 23:04

Donald Knuth will be giving his annual Christmas tree lecture Thursday next week. It'll be about strong and weak components in directed graphs and Tarjan's algorithm for computing them. I'm planning to go! It looks like it'll also be streamed online. https://www-cs-faculty.stanford.edu/~knuth/musings.html

=> More informations about this toot | View the thread

Written by shachaf on 2024-11-26 at 01:04

Alpha-beta pruning in one sentence:

If you want to compute max(8, min(5, ...), ...), you don't need to compute the rest of the arguments to min, because they won't affect the value of the max.

=> More informations about this toot | View the thread

Written by shachaf on 2024-11-03 at 00:33

"Memory Barriers: a Hardware View for Software Hackers" by Paul McKenney is a nice document on the hardware perspective of memory ordering! I wish I'd come across it when I was first figuring these things out.

There are a few versions floating around -- the latest one I found is http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2010.07.23a.pdf

=> More informations about this toot | View the thread

Written by shachaf on 2024-10-28 at 02:07

I thought that mfence and locked instructions behaved similarly in x86, but measuring on my AMD 7940HS, mfence seems significantly slower (assuming I measured correctly): Uncontended lock inc takes ~7 cycles, unlocked inc+mfence takes ~59 cycles. What's going on there?

=> More informations about this toot | View the thread

Written by shachaf on 2024-08-21 at 20:50

It looks like Linux recently added MAP_DROPPABLE, which lets the kernel zero mapped pages under memory pressure. I wonder how you'd typically write code that uses this for e.g. caches, given the page granularity and lack of explicit notification.

=> More informations about this toot | View the thread

Written by shachaf on 2024-08-08 at 03:06

Regarding current discourse: The only maths you need to know to be a programmer is a little topological group representation theory. The rest is overemphasized and not important except to specialists.

=> More informations about this toot | View the thread

=> This profile with reblog | Go to shachaf@y.la account

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/109551603717692687
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
260.018809 milliseconds
Gemini-to-HTML Time
1.197682 milliseconds

This content has been proxied by September (3851b).