dannyt Posted December 9, 2011 Report Share Posted December 9, 2011 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 Quote Link to comment
Ton Plomp Posted December 13, 2011 Report Share Posted December 13, 2011 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 Quote Link to comment
dannyt Posted December 14, 2011 Author Report Share Posted December 14, 2011 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 Quote Link to comment
asbo Posted December 14, 2011 Report Share Posted December 14, 2011 One thing that's helpful, not only in this instance but in general, is to turn on the setting to show constant folding. In most cases, it's not hard to pick off what should be constant, but it's still nice to have a reminder. Quote Link to comment
jcarmody Posted December 14, 2011 Report Share Posted December 14, 2011 Benchmarking nugget - http://forums.ni.com...de/td-p/1179349 Quote Link to comment
Ton Plomp Posted December 14, 2011 Report Share Posted December 14, 2011 Well today my computer is even slower. Here's a snippet with the 1st-5th run on the FP stored. Ton Quote Link to comment
dannyt Posted December 15, 2011 Author Report Share Posted December 15, 2011 Benchmarking nugget - http://forums.ni.com...de/td-p/1179349 Thanks for the link, I will have a read of that when I get time later this week and I will also go ovr you new post Ton, just to convince myself I can get the same figures. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.