The examples given appear to be quite concise. They are all compiled and will generate very similar machine code. The speed at which they run will be mostly affected by the type and clock speed of the processor they are compiled to.Hi, I'm trying to reduce the time taken to execute the code
Thanks..so how would the code look like in that case?I think, for this particular type of problem, a lot of it comes down to how well the compiler can leverage things like the SIMD instructions of the processor. I don't know how well modern C compilers are at doing that. My understanding is that Python and Java both have modules/libraries available that are pretty good at it. A language like MATLAB is specifically designed to leverage these capabilities and the matrix nature of the notation is designed to make doing so much easier.
In addition, this is a problem that would lend itself extremely well to parallelization on different cores (or using a high-end graphics card), so once again it comes down to whether the compiler is able to effectively decompose the problem along those lines and how the code should be written to enable the compiler to do so.
That's going to depend on the language and, possibly most importantly, the specific compiler you are using. If you really want to squeeze performance out of your code, you have to get extremely familiar with the intimate details of your tools and learn what they can do and how you need to write your code to enable them to do it.Thanks..so how would the code look like in that case?
|Thread starter||Similar threads||Forum||Replies||Date|
|G||Single cylinder Arduino CDI code works, but does need a little tweeking. Can you help please?||Programming & Languages||0|
|K||PIC12F1822 need help with D/A, fixed voltage regulator. 6 lines of code.||Microcontrollers||2|
|N||Arduino. Hey i doing a timer with a 555 chip and i need help with the code||Programming & Languages||1|
|Help me pls..... i need embedded c code for a solar tracker using atmega16 ..it uses a single servo motor ,2 ldrs ..(Atmel studio)||Homework Help||17|
|Need help to understand I2C example code||Microcontrollers||19|
|Single cylinder Arduino CDI code works, but does need a little tweeking. Can you help please?|
|PIC12F1822 need help with D/A, fixed voltage regulator. 6 lines of code.|
|Arduino. Hey i doing a timer with a 555 chip and i need help with the code|
|Help me pls..... i need embedded c code for a solar tracker using atmega16 ..it uses a single servo motor ,2 ldrs ..(Atmel studio)|
|Need help to understand I2C example code|
by Jake Hertz