Hacker News new | past | comments | ask | show | jobs | submit login

Most CPU architectures offer special optimised instructions for grabbing data in a structure - it's done as an offset from the base pointer. A double star dereference can not benefit from this optimisation.



I think there are the same number of dereferences in both cases? One to fetch the next pointer, and one to update the previous next pointer if a removal is required.

You could probably make the second bit of code worse by not holding the value of star curr in entry.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: