Better HN
topnewbestaskshowjobs
Log inSign up

smellia

1 karma · joined Oct 23, 2019 (7y ago) · 2 submissions

Submissions

comment 7y ago · link · parent

Its the opposite. Its easy to write such a loop with unsigned ints: for(x=top;x<=top;x--). However you can't reliably write a loop spanning the whole space with signed ints without breaking the no-overflow rules. With unsigned you can do x=0;do{stuff(x);}while(++x); Good luck doing this with signed ints.

comment 7y ago · link · parent

Then you must have a look at the amazing elastic binary trees used in haproxy, the article describes their properties quite well in terms of binary search: https://wtarreau.blogspot.com/2011/12/elastic-binary-trees-e...

These were featured at QCon last June by one of their authors. Really great work.