?: Operator Vs. If Statement Performance

后端 未结 7 855
轻奢々
轻奢々 2020-12-05 23:18

I\'ve been trying to optimize my code to make it a little more concise and readable and was hoping I wasn\'t causing poorer performance from doing it. I think my changes mi

7条回答
  •  感动是毒
    2020-12-05 23:49

    I think my changes might have slowed down my application, but it might just be in my head.

    Unless you are actually measuring performance, it's all in your head and idle speculation.

    (Not to pick on you in particular, but it is so disappointing to see question after question about performance micro-optimizations (as well as many of the answers) that do not contain the word "measure".)

提交回复
热议问题