I would like to take full advantage of the new Vector class for FP10, but it seems to be marked as final.
I do some intense math processing in ActionScript and repeatedly process Numbers arrays. I previously used my own subclass of Array (I call it NumericArray) with added functions like sum (), mean (), add (), multiply (), etc. This works very well and allows clean OO code. However, I am looking at profiling that about 95% of the processing time occurs in the functions of these objects. I need more performance from these arrays.
I want to use Vector, as it provides some performance improvements. I want to use it specifically Vector.<Number>. Unfortunately, I cannot subclass Vector, since it is marked as final.
What is the best and cleanest way to emulate what I did previously with the Array subclass before Vector.<Number>?
I thought about passing variables Vector.<Number>instead of my custom class and just using utility functions to manage, but this is not a very good OO design and it will be painful to use, not to mention ugliness.
Kekoa source
share