your tests suggest looping through lists performs slower than other data
structures. however, what about list functions like ListGetAt()? list
functions are a large reason why i choose lists over arrays most of the
time.
mike
> -----Original Message-----
> From: Chris Evans [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 01, 2000 1:32 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Another question on performance -- better than lists?
>
>
> I just ran some tests, and was surprised by the results.
>
> Caveats:
>
> 1) These are simple looping tests, and only give a general idea of speed.
> YMMV.
> 2) Use the most reasonable variable type for the job.
> Converting a list to
> an array to use array functions may negate any performance gains you may
> see. If you are looking for a value, and you only know its name, use a
> structure.
>
> The tests:
>
> I created a series of simple loop statements for each variable type:
> Queries, Arrays, Structures, and Lists. They were all equivalent to a
> 2-dimensional array. Each "Set" loop consisted of 5000
> iterations. I then
> created another set of loops of 100 iterations to grab some values.
>
> Summary:
>
> I expected Structures to be fastest, but that honor went to Arrays.
> Arrays are followed closely by Queries. Structures were a little slower,
> and lists took *forever*. Structures are very powerful, and
> definitely have
> performance gains if you are dealing with keys/values, but are not
> inherently faster.
>
> Results:
>
> Query Set Time: 3515 ms
> Query Get Time: 10 ms
> ------------------------------------------------------------------
> ----------
> ----
> Array Set Time: 3174 ms
> Array Get Time: 10 ms
> ------------------------------------------------------------------
> ----------
> ----
> Struct Set Time: 5368 ms
> Struct Get Time: 20 ms
> ------------------------------------------------------------------
> ----------
> ----
> List Set Time: 47248 ms
> List Get Time: 711 ms
>
>
> If anybody wants to see the test code, let me know and I'll mail
> it offlist.
> If anybody else has done any testing, I would like to see those results as
> well.
>
> Chris Evans
> [EMAIL PROTECTED]
> http://www.fuseware.com
>
>
> -----Original Message-----
> From: Mike Amburn [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 01, 2000 10:21 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Another question on performance -- better than lists?
>
>
> > ok... so when it comes to performance, it's better to use
> > strutctures than
> > arrays and both of those are better than lists.
>
> i thought lists were always fastest. is this not true? when did
> this happen?
>
> mike
>
> ------------------------------------------------------------------
> ----------
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
>
> ------------------------------------------------------------------
> ------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.