improve overall performance

This commit is contained in:
CismonX 2020-05-17 00:16:59 +08:00
parent 0ab477710a
commit dba0c01835
No known key found for this signature in database
GPG Key ID: 315D6652268C5007
1 changed files with 6 additions and 2 deletions

View File

@ -318,7 +318,11 @@ u6a_runtime_execute(FILE* restrict istream, FILE* restrict ostream) {
case u6a_vf_in: case u6a_vf_in:
current_char = fgetc(istream); current_char = fgetc(istream);
func = arg; func = arg;
arg.token.fn = current_char == EOF ? u6a_vf_v : u6a_vf_i; if (UNLIKELY(current_char == EOF)) {
arg.token.fn = u6a_vf_v;
} else {
arg.token.fn = u6a_vf_i;
}
goto do_apply; goto do_apply;
case u6a_vf_cmp: case u6a_vf_cmp:
if (func.token.ch == current_char) { if (func.token.ch == current_char) {
@ -345,7 +349,7 @@ u6a_runtime_execute(FILE* restrict istream, FILE* restrict ostream) {
} }
break; break;
case u6a_vo_sa: case u6a_vo_sa:
if (acc.token.fn == u6a_vf_d) { if (UNLIKELY(acc.token.fn == u6a_vf_d)) {
goto delay; goto delay;
} }
STACK_PUSH1(acc); STACK_PUSH1(acc);