Of course, array bounds check will make things slower. However spending days 
of debugging an array overflow is also slow, I think that array bounds check 
is a must if it can be turned off.
Good to know that flat arrays are even slower -- do not need to bother 
implementing them, maybe timing them first, after having some functions for 
timing.



----- Original Message ----- 
From: "Nicolas Cannasse" <[EMAIL PROTECTED]>
To: "Open Source Flash Mailing List" <[email protected]>
Sent: Tuesday, September 11, 2007 10:56 AM
Subject: Re: [osflash] Anybody interest in developing a new compiler?


>>> if you try to access index 11 in array n, an IndexOutOfBounds
>>> Exception is thrown. Same for C#, Objective C and obviously C. This
>>> is fundamental and basic to all professional languages and
>>> Actionscript 3 doesn't have it? Why? Who knows but it's not there.
>>
>> But a compiler could optinally create code for array bounds check, if the
>> language allows defining the array size.
>> I see that getMember is a slow operation, however on more dimensional 
>> arrays
>> we lay them out as a flat array and use mulitiplacation to access array
>> elements.
>
> That would be even slower. You should consider experimenting first with
> hxASM (http://haxe.org/hxasm) to manipulate the Flash9 AVM2 bytecode and
> do some timing of different operations.
>
> Compared to lowlevel languages compilers such as C, there is little room
> for performances improvement in AVM2. There is in fact only a few good
> ways to generate bytecode from a given implementation.
>
> The way to get better performances is then through high level language
> features support that permits the compiler to optimize things
> aggressively by using the most appropriate lowlevel implementation.
>
> This way you all the benefits at the same time : programs are faster to
> write, easier to maintain, and runs faster. The only requirement is to
> learn to use these highlevel constructs.
>
> Nicolas
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
> 


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to