Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Move-corresponding Doubt

Former Member
0 Likes
934

Hello Experts,

I am having 10 fields in say structure s_struct1 and another structure is having 12 fields.

If i will use Move-corresponding from S_STRUCT1 TO S_STRUCT2.

insted of Move statetement 10 time for 10 different fields.

Which will take more time and how much more time?

Neno sec, Micro sec, Mili sec, Sec, mins etc.

Keep in Mind 10 move statements and 1 move-corresponding.

Target 10 field value move.

Regards,

Preeti Gupta

Message was edited by:

Preeti Gupta

7 REPLIES 7
Read only

Former Member
0 Likes
907

Always do not use move-corresponding unless you have many fields from structure to other structure.

Move-corresponding will take more time than individual move statement

Thanks

Seshu

Read only

0 Likes
907

How Much time. Be specific.

Read only

0 Likes
907

Check the BLOG - it's very specific. It measures run times for different performance techniques including this.

Rob

Read only

0 Likes
907

Nano sec in both the cases.

But time taken in move-corresponding is greater!

Cheers!

Read only

Former Member
0 Likes
907

MOVE-CORRESPONDING takes a very slightly longer time to execute, but unless you're into extreme performance tuning, the effort is not worth the bother. See:

<a href="/people/rob.burbank/blog/2006/11/16/performance--what-will-kill-you-and-what-will-leave-you-with-only-a-flesh-wound">Performance - what will kill you and what will leave you with only a flesh wound</a>

Rob

Read only

Former Member
0 Likes
907

The MOVE-CORRESPONDING is not performance issue. It has a slight overhead against the specified moves, this should be clear, if you think about it.

The programmed moves specify something, which the MOVE-CORRESPONDING most find out.

Use MOVE-CORRESPONDING, if you structures can change, otherwise you get an error later or you must the program again.

Don't use MOVE-CORRESPONDING if your table is buffered, because the buffer select is so fast, that the MOVE-CORRESPONDING is in the same range.

But never forget, performance is determined by indexes, not by MOVE-CORRESPONDING!

Siegfried

Read only

ThomasZloch
Active Contributor
0 Likes
907

I have no doubts about "move-corresponding" at all, it allows for elegant and dynamic programming, nano seconds don't matter really in this case.

"move-corresponding" for president!