Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!fauern!faui1f!kskalb From: kskalb@faui1f.informatik.uni-erlangen.de (Klaus Kalb) Newsgroups: comp.sys.handhelds Subject: Lists in the HP48 Message-ID: Date: 23 Nov 90 09:52:01 GMT Sender: root@medusa.informatik.uni-erlangen.de Lines: 32 Hello everybody ! I want to know how the HP48 implements the data type LIST. Are they just plain, ordinary linked lists or is there something more spohisticated going on ? To my opinion, this is a importent issue to any programmer that wants to use large lists for storing things. Knowing details about the implemtation will answer questions like: -- How do I append a item as fast as possible if I don't mind the order ? If plain vanilla linked lists are used, appending to the front is constant in time ( O(1) ), but appending to the tail is linear ( O(n), to be exact ). -- I have noticed that LIST\-> and \->LIST are quite fast, even with lists of length >1000. Maybe the stack is just a list ? -- How do you insert and delete arbitrary items ? It seems that doing LIST\->, manipulating the stack and then \->LIST ist quite fast, but is this true ? By the way, thanks to the net for all those great programs and infos. -KK ------------------------------------------------------------------------------ Klaus Kalb | mail : IMMD1 / Martenstr. 3 / W-8520 Erlangen / Germany | email: kskalb@immd1.informatik.uni-erlangen.de ------------------------------------------------------------------------------