LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with hexadecimal string concatenation

I am not sure how good or bad or bad it is. It seems actually good to me and it is about 3 times faster compared to unflatten from string.

On my Lenovo X260 laptop (Windows 7 64-bit, LabVIEW 2014 32-bit, executed in source code with 1 million iterations your code runs for about 0.6 seconds compared to the unflatten form string which takes 1.8 seconds.

 

0 Kudos
Message 11 of 13
(355 Views)

Could be even faster if you remove the first cast and reverse array. Simply reverse the string and cast to the array of singles.

 

It surprises me a bit it's faster... Makes me wander if maybe there's constant folding going on...

0 Kudos
Message 12 of 13
(338 Views)

It's not per se bad, but your routine will fail when run on a big endian target. Now you could say that is not a problem since after the demise of PowerPC Macs there is only one LabVIEW platform that uses still big endian binary internally, namely the Power PC based VxWorks realtime targets, which are in maintenance mode too now. Still, LabVIEW has many tools that make it aware of endianess and it's a good idea to make use of them when you can!

Rolf Kalbermatter
My Blog
Message 13 of 13
(331 Views)