nikiller 18 Posted February 20, 2016 hi, I would like to know if append is faster than pushBack to add element(s) to array. thank you. cya. Nikiller. Share this post Link to post Share on other sites
Arkensor 96 Posted February 20, 2016 Skaronator: It's highly recommended to use the new pushBack command, up to 43% faster than set and up to 11843% faster a plus b! Heeeere's Johnny!:" _array1 append _array2" is roughly 1.2x faster (depending on array size) than "_array1 = _array1 + _array2" You could check with Bis_fnc_codeperformace which of both is even quickter. I go with pushBack all the time, but maybe append is a bit quicker. It was different in my test ... but they were pretty close in 1000 circles of testing with arrays Regards Arkensor 1 Share this post Link to post Share on other sites
nikiller 18 Posted February 21, 2016 Thank you, I will give BIS_fnc_codePerformace a try. Share this post Link to post Share on other sites
killzone_kid 1333 Posted February 21, 2016 pushBack is faster 1 Share this post Link to post Share on other sites
pedeathtrian 100 Posted February 21, 2016 pushBack is for adding only one element to array, so when you use it you at the same time give the knowledge of amount of elements (one) to adding function. Whereas append works for array of arbitrary count of elements to add, so it must first do extra work of defining how much elements is passed for appending and so on. Not tested, but my bet is that append is faster for adding multiple elements than loop of pushBack's Share this post Link to post Share on other sites