if(SBUF==((unsigned char code *)"关闭投球")[j])
编译得到的汇编代码:
效率一点不受影响。
589: if(SBUF==((unsigned char code *)"开启投球")[i])
C:0x16C8 E52B MOV A,0x2B
C:0x16CA 900208 MOV DPTR,#0x0208
C:0x16CD 93 MOVC A,@A+DPTR
C:0x16CE B59911 CJNE A,SBUF(0x99),C:16E2
590: {
591: i++;
C:0x16D1 052B INC 0x2B |