Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
esneider
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
esneider
10y ago
I wrote that algorithm! A year later I found Hacker's delight, a wonderful book that had a much "faster" version of the same algorithm (less ops). For anyone interested in this kind of things, you should go read that book. It
2.
▲
Y U NO commit??
(github.com)
212 points
by
esneider
12y ago
|
132 comments
3.
▲
by
esneider
13y ago
Fair enough... I thought it would be more difficult/inefficient to check for cyclic hierarchies, but it wasn't. Fixed! Thanks.
4.
▲
by
esneider
13y ago
Yep, you can also do void *p; free(p); free(p); Don't get me wrong, I get where you are going. But C philosophy is that libraries shouldn't do expensive checking to detect programmers' errors.
5.
▲
by
esneider
13y ago
Hierarchical memory allocations are a great concept. But Samba's talloc is kind of bloated, with all the reference counting, destructors and stuff. Here is a simple, 200-line version of just the hierarchical allocator: https:/&#x