Why is this code with several “or” statements slightly faster than using a lookup table in Java?

后端 未结 5 2438
旧时难觅i
旧时难觅i 2021-02-20 17:30

While looking at a micro-optimization question that I asked yesterday (here), I found something strange: an or statement in Java is running slightly faste

5条回答
  •  花落未央
    2021-02-20 17:50

    It's an interesting piece of code, but 2% is a really small difference. I don't think you can conclude very much from that.

提交回复
热议问题