TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Manikavelu Velayutham
250
7.6k
2.5m
Performance Clarfication - Iterating Objects Property Inside Another Objects - Like Object as a tree
Sep 13 2010 6:40 AM
I have provided the sample code to assign the values in two different methods.
Can any one justify me which method will execute fastter and the reason behind it ?
Method 1
for (i=0;i <objD.length;i+=)
{
objnew.APEID = objD[i].APEID;
objnew.APEName= objD[i].APEName;
objnew.APEClass= objD[i].APEClass;
objnew.APESubject= objD[i].APESubject;
objnew.APESection= objD[i].APESection;
objnew.APEYear= objD[i].APEYear;
}
Method 2
for (i=0;i <objD.length;i+=)
{
object objData = objD[i];
objnew.APEID = objData .APEID;
objnew.APEName= objData .APEName;
objnew.APEClass= objData .APEClass;
objnew.APESubject= objData .APESubject;
objnew.APESection= objData .APESection;
objnew.APEYear= objData .APEYear;
}
Reply
Answers (
1
)
Quation
MenuStrip layout