Jump to content

Performace of OpenG String to 1D array


Recommended Posts

I have been really using OpenG VI's a lot more in the last few weeks as I am working alone in my new job and I have no constraints on what I do.

I do a lot of string to 1D aray type conversion typically a comma seperated string in a setup file converting it to an array, I was using the spreadsheet string to array but thought I would use the OpenG version as it is better on a block diagram, less room and functionaly neater.

However I was supprised that the addition of the case structure in the OpenG version (used to get a little more functionality) had such an increase in performace. It made me wonder if the functionality in the OpenG VI should be split into two VI's ?

timing spreadsheet to string.vi

Dannyt

Link to comment

Your method of testing is wrong, for instance the native version only takes 0 ms, this is so because the code is compiled and the result is stored in memory.

By replacing all the inputs to control I got the OpenG twice as fast as the the 2nd (with case structure function):

Ton

Link to comment

Hey Ton,

I was very interested in your reply as I feel this could impact other perfomace tesing I do; I am sure on both Lava & the dark side I have seen people test with hardcoded values on thier block diagram, but if I am doing this wong I would like to understand in what way.

I changed my VI making the csv string to a control and also the "," and "%s" to controls.

I then make all the control default values something other than the real values I wanted to use before saving it. Next I placed this as a subvi and tried again. I still get the type of values.

I do understand what your point is having read the info on the 2011 compiler optimisations, but I cannot see how your got the different results.

Danny

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.