Why is-C code so much faster? (Image processing)

Hello!

I'm working on a larger application but I reduced to show you a problem I encounter at the beginning. I join all the files needed to run.

It is simple rgb2monochrome that I implemented in C code algorithm and code LabVIEW. I have not now why the C code is 4 times faster.

In the code C transfer tables with pointers so I'm working on a given memory area. I thought that LabVIEW can be slower, because it creates unnecessary copies of berries. I tried to solve this problem with Structure elements instead and value reference data but no effect.

I also tried to change the tunnels in the shift registers in some places (read in optimizing LabVIEW Embedded Applications). I changed options in the execution of the subVIs properties and I created EXE application to see if it will be faster. Unfortunately I can not yet reduce the difference time of execution.

I know that my algorithm can be better optimized, but this isn't the main problem. Now the two algorithm are implemented in the same way (you can check in cpp file) when it should have a similar execution times. I think I made a mistake in the LabVIEW code, maybe something with memory management?

And I know more... Maybe nothing wrong with LabVIEW code but something too good in C code ? It is 64 b library, implementation of usual way without forcing the parallelism. Moreover I brand performance in the thread of UI in COLD LAKE. But perhaps nevertheless CPU manages this function with multi hearts? I have 4 cores then the difference in execution time would be good . But it's impossible, right?

I know that the notice that LabVIEW is sometimes slow, but approximately 15%, not 4 times. So I had to make a mistake... Anyone know what kind of ?

Kind regards
ksiadz13

Well, here are a few things that make faster LabVIEW code, there are other improvements that could be made, but I would need to do several tests to see if they are better based on your input data.  First of all, I would like to enforce the VI Inline, not subroutine.  Also, I'd work with arrays of data instead of scalar values.  Also, you know the number of rows and columns because it is the size of the array, why keep this information?  Oh and if you are working with curls you can try parallel for loops to work on more than one processor at a time.

And also, I'm not sure that all this work is in any way necessary.  If you have a double and turn it into a U8, it will be 255 If the value was greater than that to start with.  Attached is an updated release with several possible options to try.

Oh and another improvement, why are you even unbundling the data in Unbundle_imageCPU1.vi?  Why not work with this table 2D-Red Green Blue?  I realize that even VI is called in LabVIEW code options both C but with LabVIEW just deal with other data could make faster together.  In particular, in view of the fact that regroup you after you're done anyway.

Tags: NI Software

Similar Questions

  • much faster image navigation (develop and library modul)

    take a folder with raw images, open breezebrowser... Select ctrl-s (slideshow), ctrl-s (stop slide show) and then fly through the images to select or remove... .de, then you know what to do - saves tons of time even a small project... compared to lightroom

    Thank you

    Did you post before moving to ask a question or you feel just like evacuation?

  • Why disable SuperFetch on ssd, if the RAM is much faster than the ssd?

    Directed by Microsoft that SuperFetch and PreFetch must be disabled, if the OS is installed on an ssd, in accordance with article http://support.microsoft.com/kb/2727880. But SuperFetch is used for loading the data components of applications, which were very often used for RAM. Although the ssd is faster that a hard drive is not faster than the RAM. So, I do not understand why Microsoft suggest disabling this feature. The only reason why I want to understand, it's because of a limited RAM. If the RAM is sufficient beyond 6 GB, if we disable SuperFetch, then the boot time and increase the loading time of most used applications. I miss something here?

    The other question is about PreFetch. I feel, maybe wrong, it does the same thing with SuperFetch, with one major difference. It loads all the information data on the ssd or hard drive, instead of the RAM, in order to accelerate the launch of applications and time when the OS is installed on a hard drive to boot. If I'm right, let's disable the PreFetch it stores information for one ssd or hdd, while SuperFetch stores data of RAM information, which is much faster and so it must be enabled if there is a sufficient RAM.

    I look forward to reading the notice of a Microsoft software engineer.

    Hi Leventis,

    Prefetch copies frequently accessed files together into a contiguous on the disk area so that they can be located and loaded more quickly. That it takes a lot of old drives to recover data faster.

    SuperFetch predict what applications you run next and preload all the necessary data in the memory. She has also done that with startup files. And for all the three days he sends a defragmentation command to the OS drive that will cause problems in the SSD drives.

    In traditional hard drives (HDD) data are scattered throughout the disk, so that the operating system for access, it will take more time. It is suggested to perform a disk defragmentation. But storage technology is different in SSD, where, it records the data dynamically and it recovers more quickly. Who will be low down the burden on the RAM and the RAM can be used for uses such as for the opening of the games graphics high-end, etc..

    Hope this information is useful.

  • Adobe metadata Muse - I was put in the description, the customer wants to appear in the search through properties of the Page engines > metadata > description and nothing changes. I'm not a coder, that I'm a Designer, that's why I love Muse so much,

    -Metadata I was put in the description, the customer wants to appear in the search through properties of the Page engines > metadata > description and nothing changes. I'm not a coder, I'm a Designer, that's why I love Muse so much, but it is a real problem. any help would be appreciated. I watched the tutorial by Dani Beamount already it was very clear but his does not work for me

    What Miss me?

    That you expect your customer as a 'change' ?

    Google does not use the Description so much more. You can always add it, and it might be useful to other search engines and other purposes. But Google structured content, good keywordsand values a good title !

  • Why is the Nightly build of so much faster and has better quality than the final product of Firefox features?

    The Nightly build is so much faster than Firefox, and the download feature is much better than the download feature in Firefox.

    The arrow next to the home button will appear in the version of Firefox in Firefox 20. All the features that are in every night thereafter will appear in liberation, when they are ready.

  • Responsiveness of Windows XP is much faster than Windows 7

    According to this video

    http://www.YouTube.com/watch?v=Ay-gqx18UTM

    and MY personal experience, the xp desktop responsiveness is so much faster and less glitchy than windows 7 (e.g. open services.msc and play with the window, you will see black borders).

    You guys are going to solve this problem on Windows 8, to finally defeat xp in all aspects?

    Original title: why Microsoft, why?

    I have the same specification as Palcouk outside the video. Mine is a HD4250 integrated ATI and I get the black border.

    It may be safe to pin this one on the video card and drivers reasonbly

    Yes and also view the video uses Win 7, RTM, as in no current.

    I use two operating systems on Dells reasonably comparable...  I would say that in my experience 7 is faster than XP and not at all what I would call "glitch."
  • Anyone know why, when I try to open an image with camera raw in Bridge, it is said: "the camera raw editing is not enabled.

    Hi guys,.

    Anyone know why, when I try to open an image with camera raw in Bridge, it is said: the camera raw editing is not enabled. Camera raw edition requires a product calling has been launched at least once this feature.  What should I do?

    Thanks in advance :)

    original title: problems of camera raw

    Try the Adobe forums

    http://www.bing.com/search?q=Camera+raw+editing+requires+that+a+qualifying+product+has+been+launched+at+least+once+site%3Aadobe.com&qs=n&form=QBRE&pq=camera+raw+editing+requires+that+a+qualifying+product+has+been+launched+at+least+once+site%3Aadobe.com&sc=0-0&sp=-1&sk=

  • HOW MUCH FASTER?

    Closer (if possible) percentages, please advise or just give me a rough idea: HOW MUCH FASTER IS WIFI at a SPEED of 18 Mbit/s and the QUALITY of the SIGNAL VERY GOOD (four out of five bars) compared to 18 MB/s SPEED and QUALITY of the EXCELLENT SIGNAL (5 bars).  I noticed fluctuations in continuous - even up to as high 54 Mbps and as low as 11 Mbps, but the signal is mainly around VERY GOOD to EXCELLENT in quality (i.e., four or five green bars) Notwithstanding the comings and goings, I use the WIFI N Protocol adapter (library, cafes hotspot, etc.).  Yes, sometimes, I moved to another part of the library, coffee, etc., but if not I can try improve the quality of signal and speed? The laptop is enough recent manufacturing (2009 or 2010), with 3G of RAM and 300 G hard drive and Windows VISTA.

    Thank you very much.
    Joe

    Hello

    It is likely to be only differences of minimum speed in these scenarios, if she would have certainly depends on
    the WiFi network that you accessed. Even if the WiFi signal you receive hard there may be a slow
    hose connecting WiFi to internet and/or a large number of computers sharing access.

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Why my OS took so much space and how can I turn off automatic Back-ups?

    Hi, I'm opperating on Windows Vista Basic Home Edition on top of a HP540 Tower, which has 160 GB hard drive.

    Except for the 20 GB Partition, I stayed with 129 GB to install a fresh on o/s.

    After installing my o/s and updates the 7Gig to clean Documents saved from after installation.

    I was left with 99 Go!

    Something wrong without a doubt!

    Even more, I'm losing memory on my hard drive like there is no tomorrow, 30 GB in 4 days!

    It seems every time I'm streaming videos, or even just to watch videos, an external hard drive.

    I lose about 1 or 2 GB!

    Using a number of antivirus programs, I scanned for a virus, but all programs concluded that the

    the system is clean and that there is no virus!

    This led me to believe that the system backup and restore several coppies of his car, then

    I have used the disk clean up to remove all but the most recent backup file.

    All of a sudden my disk space is increased from 69BG to 99 GB.

    I still don't know what happened to the other Go 20 or 21.

    Although this seems to be a difficulty, with in a few minutes that the backup has been busy writing far still and in

    15 minutes that I had fallen to 97.3 GB and deminuishing.

    Why my OS took so much space and how can I turn off automatic Back-ups?

    Thank you very much!

    Nothing wrong as far as I can see.  A Windows installation will take about 20 GB to 30 GB so it's fine, and you will lose even more space for virtual memory to system management file, hibernation, system restore points file and so on.  Although the "30 GB in four days" is perhaps a little on the high side, considering that you have just installed Windows, there are a lot of household, creating files and so forth go on these days.

    With the help of disk cleanup to delete these files from system restore is a bad choice, because they are created to ensure the security of your system and allow you to recover from any problems that may require them.

    If disk space is as big a problem to get a bigger hard drive and let the system restore to do its job.

  • Fonts: Selfhosting or Google much faster than Typekit/Edge?

    It is much faster font free host or use Google instead of Typkit fonts?

    I did a test by myself: my website http://DAS-werbeatelier.de now (since yesterday) use "Lato" Edge-Webfont.

    I m sure, this isn't the right way to test, but I took 'Google Page speed Insight' with a result of 47 (mobile) (bad) and 58 (desktop).

    Before yesterday the same website also used Lato - but as police auto-hébergées on my server.

    The result of speed Page was: 51 (mobile) and 64 (desktop).

    That's a significant difference - and it seems to be known.

    https://www.keycdn.com/blog/Web-font-performance/Bildschirmfoto 2016-08-03 um 08.18.16.JPG

    If this can be true? This means that, if you want a really fast site (-muse), Don t use Typekit oder Edge-Fonts?

    On the other hand, it is very convenient to use Typekit/Edge with Adobe Muse...

    I understand. 2 seconds "before opening" kill really!

    Have you tried to pass on the new option I mentioned above?

  • Why do I images allowed in my library and I have not yet bought something? Why my library say I have 17 images, but I only see 9? Why can I not see a button "buy"? So frustrating, I want just to save pictures in my library to use as drafts

    Why do I images allowed in my library and I have not yet bought something? Why my library say I have 17 images, but I only see 9? Why can I not see a button "buy"? So frustrating, I want just to save pictures in my library to use as drafts before I commit to all the images that I need for my publication as my employer Gets the last word. I have not had any problems with $ Photo... * sigh *.

    Hello

    Please check the following for more information on the use of Adobe Stock:

    Adobe Stock help | Adobe Stock learn & support

    Currently, you have 6 allowed pictures and 22 available.

    Kind regards

    Bev

  • Why is the water still on my image brand

    Why is the water still on my image brand

    Yes, it's an Adobe Illustrator file .ai file. You must open in Illustrator or other vector graphic application compatible.

  • Image processing failure: error code: 1004

    When you export to DropBox of Lighroom I get this error: image processing failure: error code: 1004

    Under which it lists all the images that I export.

    99% of the time the images for export to the correct location and look good. But the error always comes to the top. And every now and then photos are not really exporting.

    Windows 10

    Lightroom Version CC 2015.3

    Thank you!

    Try to reset the preferences of the instructions here file

  • Why my license code does not work on lightroom 6 for mac?

    Why my license code does not work on lightroom 6 for mac? My os x is "el capitan".

    Please try the steps to serialize Lightroom CC trial to activate like Lightroom 6 mentioned on: https://helpx.adobe.com/lightroom/kb/serialize-lightroom-cc-trial-to-activate-as-lightroom - 6.html

    You can also try: error "serial number is not valid for this product". Creative Suite

  • Why can't I import camera raw images in lightroom 5.7.1?

    Why can't I import camera raw images in lightroom 5.7.1?

    Yes

Maybe you are looking for