quote:Original post by Stoffel
PS: if your test is this simple, I would highly suggest not doing a timed trial at all. Write a program that calls each function to be examined and then look at the disassembly--that way you know exactly what you''re talking about. I won''t go through the pain and suffering of doing it (I already know how to--you should learn), but I guarantee that these methods all compile to the same code.
quote:Original post by BSXrider
The assembler of all the options I listed better had NOT be the same - if it is then there''s a lot of wasted complexity in c++ !
quote:Original post by Stoffel
hope you''ll listen to me in the future
We have a bit of a comms tangle here. I did listen to your post, too closely in fact. It seemed to me that you said "these methods all compile to the same code". If you''d said "both" instead of "all" I might have seen your point, but instead I inferred that you meant ALL 5 of the options I''d listed. You see. My apologies
I agree with you on that disassembly though. Which is pretty much what options (4) and (5) in my original post determined, that the results were close enough the same. Because putting the function body in the class like you''ve done makes it automatically inlined.
quote:Original post by Kylotan
Did you conduct the tests in every possible order to avoid any order effects?
I knew someone would ask that but couldn''t think of a concise way of wording it in my post. Yes, I repeated them in differing orders (ctrl-z and ctrl-y were well used )
- seb