Y
Hacker News
new
|
ask
|
show
|
jobs
by
amelius
540 days ago
Using a Vec for doubly linked lists sounds like overkill. There's got to be more efficient and more elegant way.
2 comments
thayne
539 days ago
Using a Vec actually has some benefits beyond the safety guarantees from rust. There are fewer allocations, and you probably are more likely to get nearby nodes on the same cache line.
link
unrealhoang
540 days ago
Yes, there is, just use plain old pointers. Who cares about UB anyway.
link