Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
RE: AS 2.0 optimising..

RE: AS 2.0 optimising..

2004-03-15       - By ryanm

 Back
Reply:     1     2     3     4     5     6     7     8  

> So -correct me if I'm wrong-, we have no strongly typed arrays,
> yet. Array lookup should take 0(n) time, not a constant time.
> I am guessing that they are using a dictionary internally, a
> hashtable where values are indexed as strings [String name,
> Object value].
>
   I believe you are correct, except that arrays should always be indexed
by an integer, which should be *slightly* faster than using strings like the
object collection does. Not because it is strongly typed (because it isn't),
but simply because an integer index is just smaller and faster than a string
index.

   So, to state it another way, an array may compile to the same bytecode
as an object collection, but since it uses an integer as an index it should
be at least a tiny bit faster than a string indexed object collection.

ryanm


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107055
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)