Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (2024)

+ 17

++i can be faster than either of the other 2 😎Dunno exactly why though, just is

12th Mar 2017, 4:08 PM

Jafca

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (1)

+ 15

i++ is a increment operator it takes less load then i=i+1as it consume less time and space in compilation process

12th Mar 2017, 3:09 PM

Mansi Dagla

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (2)

+ 5

i++ is faster becausethey return value before. then increment,maybe....

12th Mar 2017, 3:06 PM

Yanothai Chaitawat

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (3)

+ 5

Oh yeah.Why I didn't think like that?@Swamy

12th Mar 2017, 3:17 PM

Yanothai Chaitawat

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (4)

+ 4

In practical terms the difference isn't worth the time it takes to discuss it.

12th Mar 2017, 4:29 PM

Abner Schmidt

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (5)

+ 1

yes' very hard" but technically speaking it is matter of mechine cycle's i=i+1 will take 2 mechine cycle's means 24 clock cycles but i++ take one mechine cycle 12 clock cycles so it is faster in execution when compared to other this same is applicable for other pre and post Inc/Dec instructions

12th Mar 2017, 3:14 PM

Swamy Kanuri

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (6)

I++ is faster!

12th Mar 2017, 3:02 PM

winkyihtut

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (7)

good winkyihtut but what is reason behind it??could you explain for me

12th Mar 2017, 3:03 PM

Swamy Kanuri

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (8)

actually i got this question in an interview that's why i know @ very hard

12th Mar 2017, 3:21 PM

Swamy Kanuri

Which one is faster i=i+1 or i++ | Sololearn: Learn to code for FREE! (9)

Which one is faster i=i+1 or i++  | Sololearn: Learn to code for FREE! (2024)
Top Articles
Latest Posts
Article information

Author: Moshe Kshlerin

Last Updated:

Views: 6430

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Moshe Kshlerin

Birthday: 1994-01-25

Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

Phone: +2424755286529

Job: District Education Designer

Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.