Whatever rout you approach for the completion of engineering degree in computers either 10+2 followed by writing the competitive test to be inducted in the engineering college or taking a diploma course from a recognised polytechnic and later persuing the degree course in engineering, there would not be difference in the time consumption. To explain the same, supposing you have chosen the path of taking admission in the engineering college, your total timing for the course would be 10+2+4 = 16 years where as after passing your class ten and then joining a polytechnic for diploma, the total timing would be 10+3 years in completing the diploma. In the later situation, if interested for the degree course in engineering, you will be admitted in the second year of 4 year engineering course. Hence the total time span in this case is also 16 year from your class one.
However, your conception in both Physics and Mathematics would be better while undertaking 10+2 course because of the elaborate studies of the different chapters helping you to understand your degree course at ease since there is always application of both the subjects in your engineering curriculum. An aspirant undergoing for engineering degree course after diploma would be lacking that proficiency unless one takes a personnel coaching in these subjects to strengthen ones fundamentals. This would be an additional task for such aspirants doing engineering after one's diploma.