I'm not sure how efficient your bottom code actually is.
My understanding is that reversing an array simply sets a flag that says the array is reversed, without actually moving the elements in memory. The problem is that if you now want to add an element to the END of the array, you would still have to allocate or move the elements in memory.
Anyway, even if this can be done, you don't need a new primitive - NI can (and should) simply put any improvements it can make straight into the existing Build Array primitive and hide it from the users.
YoungKwahk, could you upload a benchmark to show the bottom is faster than the top method? You'll have to create a new post on the LabVIEW forum (Idea Exchange does not allow attachments in comments) and then cross-link back here.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
First, I don't KNOW that they haven't done this, but I'm assuming they haven't and the reason is the one I gave in my reply - appending to the end of a reversed array is not any more efficient, because a reversed array isn't actually flipped in memory - LV just knows it's reversed and indexes it in reverse. Appending to it would require allocating more memory BEFORE the beginning or moving the entire array, both of which are probably not very efficient.
This is an interesting idea, and as far as I know has not been implemented in the array primitive. As tst suggests there may be scenarios where this speed-up creates slow-downs in downstream operations. I'd have to investigate that to say for sure.
As with most compiler optimizations, even simple ones, knowing if and when to apply them is usually the difficult part. This is the reason we use hard evidence as our ultimate determinator when introducing optimizations--we'd need to prove that VIs on average benefit. But that's the process we follow for all optimizations in LabVIEW.
Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.