On 7/26/16, 12:49 PM, "Harbs" wrote:
>
>On Jul 26, 2016, at 10:39 PM, Alex Harui wrote:
>
>>
>>
>> On 7/26/16, 11:39 AM, "Harbs" wrote:
>>
>>>
>>> On Jul 26, 2016, at 8:15 PM, Alex Harui wrote:
>>>
On 7/26/16, 1:40 AM, "Harbs" wrote:
> I noticed a couple of t
On Jul 26, 2016, at 10:39 PM, Alex Harui wrote:
>
>
> On 7/26/16, 11:39 AM, "Harbs" wrote:
>
>>
>> On Jul 26, 2016, at 8:15 PM, Alex Harui wrote:
>>
>>>
>>>
>>> On 7/26/16, 1:40 AM, "Harbs" wrote:
>>>
I noticed a couple of things:
1. There’s lots of String(val) casts in Flex
On 7/26/16, 11:39 AM, "Harbs" wrote:
>
>On Jul 26, 2016, at 8:15 PM, Alex Harui wrote:
>
>>
>>
>> On 7/26/16, 1:40 AM, "Harbs" wrote:
>>
>>> I noticed a couple of things:
>>> 1. There’s lots of String(val) casts in FlexJS code. This practice is
>>> considered “bad” practice in Javascript w
How terrible it is depends on context, I guess. Starling and Feathers try
to maintain 60fps on slightly older mobile hardware. If the GC causes
dropped frames, it's terrible. Switching away from push() (and splice(),
which has two temporary Arrays) made a noticeable difference.
It's worth mentioni
On Jul 26, 2016, at 8:15 PM, Alex Harui wrote:
>
>
> On 7/26/16, 1:40 AM, "Harbs" wrote:
>
>> I noticed a couple of things:
>> 1. There’s lots of String(val) casts in FlexJS code. This practice is
>> considered “bad” practice in Javascript where implicit conversion is
>> generally quicker. S
Interesting. Good to know. Here’s what I got:
function timeJoin(){
var start = new Date();
var i=-1;
var len = 1000;
var arr = [];
while(++i wrote:
> Yeah, push() is terribly bad for performance because of the GC overhead
> from the ...rest Array. In S
Yeah, push() is terribly bad for performance because of the GC overhead
from the ...rest Array. In Starling and Feathers, we always try to avoid
push() whenever possible. We usually use bracket syntax instead:
array[array.length] = newValue;
In loops, it's possible to use a local integer counter
On 7/26/16, 1:40 AM, "Harbs" wrote:
>I noticed a couple of things:
>1. There’s lots of String(val) casts in FlexJS code. This practice is
>considered “bad” practice in Javascript where implicit conversion is
>generally quicker. So in a case where a number can be converted
>implicitly, the cast
I noticed a couple of things:
1. There’s lots of String(val) casts in FlexJS code. This practice is
considered “bad” practice in Javascript where implicit conversion is generally
quicker. So in a case where a number can be converted implicitly, the cast
should be completely skipped and even when