Re: Constructing sequences
- Posted by "Kat" <gertie at visionsix.com> Jun 28, 2005
- 646 views
On 27 Jun 2005, at 7:43, Gordon Webster wrote: > > > posted by: Gordon Webster <gwalias-bb at yahoo.com> > > Dear Euphorians > > Overall, I'm very happy with the performance of Euphoria (both > interpreted and compiled from translated C), but I've noticed > that constructing sequences seems to be pretty slow by comparison > with accessing them once they are constructed. > > When I add 100,000 smaller sequences (my data "records") to a storage > sequence, it takes me nearly 40 seconds either interpreted or > compiled, to complete. Once this 100,000 record sequence is built > however, I can access the various "records" and/or their "fields" > at blazing speeds. I get no speed up on the compiled version for > the construction of the sequence, but I do get some speedup for the > already very rapid access to the built sequence. > > I have even tried making the sequence to be constructed global, and > using a procedure to append to it, rather than a function which has > to pass a copy of the sequence. It made no discernible difference. > > I have read the performance tips about using the optimized form > 'append' etc. etc., but if any of you out there have any experience > of improving the speed of creation of large sequences, I'd be very > grateful for any tips or pointers (no pun intended). See the last email thread about getf(). It's now extremely fast at building a sequence in memory from a harddrive file. HTH. Kat