You should not worry about how fast a fundamental loop is. If you
care about speed, then your bottleneck is probably elsewhere.
firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608
Well at least you didn't mention premature optimization.
not explicitly, but it was certainly implied.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
>Well at least you didn't mention premature optimization.
I suspect you get that a lot. Probably for good reason.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>I don't see why I shouldn't be a little curious about
>how compilers compile while loops, in my spare time.
I don't either. Personally, I'd love to talk about the inner workings of compilers with someone interested in the subject. But it wasn't clear that you're generally interested in the machine code produced by compilers. Rather, it seemed like you were counting cycles and then asking us if your performance tests were "expected" across all compilers of all languages. :icon_rolleyes:
>I regret having bothered the forum with such a controversial subject.
It's not controversial at all, and if you're going to be a whiny baby after a couple of people misinterpret your misleading question, I don't regret not answering it.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Go look at the generated assembly.
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177