04-14-2011 08:32 AM
I think this is one of the most interesting topics I've bumped into here!
My results with using numerics are very similar. However, if I decrease the array size by a factor of 10 to 1000000 and change the input to a string constant "String Constant" and also replace the random number with "String Constant" then the insert/delete and delete/insert methods are *MUCH* faster. Unfortanately I can't post a picture from here at work.
04-14-2011 10:54 AM
If you replace the random number with a string constant, the entire code might get folded and the benchmark is meaningless.
Please attach your VI.
04-14-2011 01:19 PM
Ah! In fact I would hope that it would get folded!
So I changed it to convert the random number to a string and ran it again - with the same results as I got when I used a string constant. Doesn't look any folding is taking place.
04-14-2011 03:20 PM
Interesting. 😄
That's why it helps to make a comfortable benchmarking app. Yes, there are some curious differences, but I don't have time to look into it at the moment.
Other interersting tests:
Make the 1D array U8, U16, U32, or U64.
Make it a 2D numeric array, replacing rows.
Make it a 2D string array, replacing entire rows.
etc.
It would also be interesting to compare it under an older labview version....