From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f316de357ae35e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-05 10:01:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsfeed.wxs.nl!news2.euro.net!newsfeed.freenet.de!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: Mon, 5 Aug 2002 17:01:07 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <20020730093206.A8550@videoproject.kiev.ua> <20020731182308.K1083@videoproject.kiev.ua> <20020801161052.M1080@videoproject.kiev.ua> <20020802193535.N1101@videoproject.kiev.ua> <3D4EA5DA.E764BFD7@san.rr.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1028566867 1755 134.91.1.34 (5 Aug 2002 17:01:07 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Mon, 5 Aug 2002 17:01:07 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:27717 Date: 2002-08-05T17:01:07+00:00 List-Id: Darren New wrote: : So you have an 18meg text version dump of the registry. Reading it took 1.9 : seconds, splitting it on all the = signs took 1.6 seconds, and splitting it : on all the commas took 3.6 seconds. This says something about fast processors and a nice Tcl library working with a lot of memory. Now the point is, I think, what do you intend to do with a DAT-tape sized text file? When is split useful? The result of a split in your example is, I presume, a list in each case (correct?). This list has a lot of entries some of which might be of interest. Which one do you need? In this case you would either have to know the correct index or use a table, and then use that value, maybe named. The values in the table are, well, lists... And so on. Now if your software happens to be storing matrix rows as foo-separated lines in a text file of known-to-be-intact content then the builtin split operation might save you some I/O programming time, o.K. Splitting is not parsing :-) : How long did it take you to write the unbounded array package? To compile : it? :-) How long will it take to write the code that actually works with the values split into a list? In how many cases can you assume these values are homogenous enough to justify the omission of separate treatment? -- Georg