Re: Fragmented arrays?
John Reppy <[email protected]> Wed, 20 Jan 2010 15:03:30 -0600
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
Actually, there is Vector.update : 'a vector * int * 'a -> 'a vector but it is not a very efficient operation. - John On Jan 19, 2010, at 11:43 AM, Adam Chlipala wrote: > Jon Loldrup wrote: >> I read that the basis library Array structure has constant time access >> and update*. >> If an array of length n has to be able to be updated in constant time >> (that is, invariant from the length of the array), I can only see that >> it can be done if arrays are allowed to be fragmented across memory, >> like lists are. > > SML arrays are mutable, so they can be implemented in the same way as in > C, with a run-time size slot added for each array. You seem to be > discussing issues more pertinent to SML vectors, which are a distinct > (immutable) type family, for which no cell update operation is provided. > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Smlnj-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/smlnj-list > ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev