Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] removing an item from a list efficiently
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dustin Sallings <dustin@s...>
Subject: [Caml-list] removing an item from a list efficiently

	I'm trying to implement an LRU cache and I'm using a list to keep up 
with the accesses.  I'm using filter to remove the item for 
repositioning it.  That's very slow.

	Is there a better way to efficiently move a list item to the front, or 
should I just implement a linked list to meet my requirements?

-- 
Dustin Sallings

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners