linked list - How is the built in C# linkedlist library so much quicker than a simple implementation? -


i have created barebones linkedlist following node type gets chained up:

class node {      string somedatabecausewhynot;      node next;      node previous; } 

while iterating on nodes delete so:

void removenode(node n) {      n.next.previous = n.previous      n.previous.next = n.next } 

this solution 3x slower c# linkedlist.remove function.

i can't imagine why , love know difference in internal c# implementation makes quicker?


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -