Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dmitrygr
· 7y ago · 0 comments
"doubly linked list detected, this language does not support such constructs without 'unsafe' keyword being used to wrap it"
Comments
[–]
ZirconiumX
7y ago
Which is why you implement a doubly linked list using data indices in a Vec<Node>. The resulting data structure is fully safe and resembles an ECS.
[–]
dmitrygr
OP
7y ago
And features an extra level of indirection for your CPU's dcache prefetch predictor to trip over
[–]
hexane360
7y ago
https://play.rust-lang.org/?gist=c3db81ec94bf231b721ef483f58...