04-02-2015 05:00 AM
One problem solved, another rears its ugly head.
Does anyone know if the "split" and "Join" number primitives also do this string-and-back journey? I have some (less aggrevating) issues in my code I need to track down, this might be one of them.
04-02-2015 11:07 AM
While I can't offer any evidence of this, I'm confident in saying that join and split numbers don't involve any strings. Depending on what you're doing, though, they may not save you any time or memory copies versus Type Cast - at least, they didn't in my application. If I remember correctly I tried converting my string to an array of bytes, decimating that, then running the resulting decimated arrays through join numbers twice to get U32s - and it was slower than Type Cast, perhaps due to the creation of so many intermediate arrays.
04-02-2015 11:38 AM
I've since found out that split and join is at least a lot faster (I have no absolute values) than type casting. My code is now up to speed with nearly all of the functionality I wanted. Progress at last.
04-02-2015 11:42 AM
Now I'm curious - how do split and join solve converting between SGL and I32, if you're able to share?
04-02-2015 11:46 AM
@nathand wrote:
Now I'm curious - how do split and join solve converting between SGL and I32, if you're able to share?
It doesn't, it's a compeltely different problem.
I probably should have made that more clear, sorry.
04-02-2015 12:24 PM
Oh. Well, if it happens to solve the problem of converting a string (or array of U8) to U32 quickly, can you share? Because I never found a faster solution than Type Cast on the sbRIO we used, although it's possible that I got to a "fast enough" solution at the time and stopped experimenting.