For the most part, you can simply use reassignment for an empty array to clear the array; this becomes problematic if array reference is important. In this case, it works well for you.
, , . , Haxe , - , , , Neko HTML5 . , .
8 1048576 . :
Splice Clear:
array.splice(0, array.length);
Clear:
untyped array.length = 0;
:
array = [];
Pop Clear:
while (array.length > 0)
array.pop();
, , , .
Neko:
- Splice: 0,51
- : 0.069
- : 0,34
- : 0,071 0,179 ( )
HTML5:
- Splice: 0.29
- : 0.046
- : 0.032
- : 0,012
64- Windows 7 Firefox.
, while loop javascript; , - . , .
Github, - , , , Neko HTML5.